Interface GrantedAuthority
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
JaasGrantedAuthority
,LdapAuthority
,OAuth2UserAuthority
,OidcUserAuthority
,SimpleGrantedAuthority
,SwitchUserGrantedAuthority
public interface GrantedAuthority extends java.io.Serializable
Represents an authority granted to anAuthentication
object.A
GrantedAuthority
must either represent itself as aString
or be specifically supported by anAccessDecisionManager
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getAuthority()
If theGrantedAuthority
can be represented as aString
and thatString
is 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 theGrantedAuthority
can be represented as aString
and thatString
is sufficient in precision to be relied upon for an access control decision by anAccessDecisionManager
(or delegate), this method should return such aString
.If the
GrantedAuthority
cannot be expressed with sufficient precision as aString
,null
should be returned. Returningnull
will require anAccessDecisionManager
(or delegate) to specifically support theGrantedAuthority
implementation, so returningnull
should be avoided unless actually required.- Returns:
- a representation of the granted authority (or
null
if the granted authority cannot be expressed as aString
with sufficient precision).
-
-