Interface GrantedAuthority
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
JaasGrantedAuthority,LdapAuthority,OAuth2UserAuthority,OidcUserAuthority,SimpleGrantedAuthority,SwitchUserGrantedAuthority
public interface GrantedAuthority extends java.io.SerializableRepresents an authority granted to anAuthenticationobject.A
GrantedAuthoritymust either represent itself as aStringor be specifically supported by anAccessDecisionManager.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetAuthority()If theGrantedAuthoritycan be represented as aStringand thatStringis sufficient in precision to be relied upon for an access control decision by anAccessDecisionManager(or delegate), this method should return such aString.
-
-
-
Method Detail
-
getAuthority
java.lang.String getAuthority()
If theGrantedAuthoritycan be represented as aStringand thatStringis sufficient in precision to be relied upon for an access control decision by anAccessDecisionManager(or delegate), this method should return such aString.If the
GrantedAuthoritycannot be expressed with sufficient precision as aString,nullshould be returned. Returningnullwill require anAccessDecisionManager(or delegate) to specifically support theGrantedAuthorityimplementation, so returningnullshould be avoided unless actually required.- Returns:
- a representation of the granted authority (or
nullif the granted authority cannot be expressed as aStringwith sufficient precision).
-
-