public abstract class AuthorityUtils extends Object
Mainly intended for internal use.
| Modifier and Type | Field and Description |
|---|---|
static List<GrantedAuthority> |
NO_AUTHORITIES |
| Constructor and Description |
|---|
AuthorityUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Set<String> |
authorityListToSet(Collection<? extends GrantedAuthority> userAuthorities)
Converts an array of GrantedAuthority objects to a Set.
|
static List<GrantedAuthority> |
commaSeparatedStringToAuthorityList(String authorityString)
Creates a array of GrantedAuthority objects from a comma-separated string
representation (e.g.
|
static List<GrantedAuthority> |
createAuthorityList(String... roles) |
public static final List<GrantedAuthority> NO_AUTHORITIES
public static List<GrantedAuthority> commaSeparatedStringToAuthorityList(String authorityString)
authorityString - the comma-separated stringpublic static Set<String> authorityListToSet(Collection<? extends GrantedAuthority> userAuthorities)
public static List<GrantedAuthority> createAuthorityList(String... roles)