core/src/main/java/org/springframework/security/core/userdetails/memory/UserAttribute.java
public void setAuthoritiesAsString(List<String> authoritiesAsStrings) {
		setAuthorities(new ArrayList<>(authoritiesAsStrings.size()));
		for (String authority : authoritiesAsStrings) {
			addAuthority(new SimpleGrantedAuthority(authority));
		}
	}
public void setAuthoritiesAsString(List<String> authoritiesAsStrings) {
		setAuthorities(new ArrayList<>(authoritiesAsStrings.size()));
		for (String authority : authoritiesAsStrings) {
			addAuthority(new SimpleGrantedAuthority(authority));
		}
	}
public void setAuthoritiesAsString ( List < String > authoritiesAsStrings ) { setAuthorities ( new ArrayList <> ( authoritiesAsStrings . size ( ) ) ) ; for ( String authority : authoritiesAsStrings ) { addAuthority ( new SimpleGrantedAuthority ( authority ) ) ; } }
Set all authorities for this user from String values. It will create the necessary
{@link GrantedAuthority} objects.

@param authoritiesAsStrings {@link List} &lt;{@link String}&gt;
@since 1.1
Set all authorities for this user from String values . It will create the necessary { @link GrantedAuthority } objects .