Class JaasGrantedAuthority
- java.lang.Object
-
- org.springframework.security.authentication.jaas.JaasGrantedAuthority
-
- All Implemented Interfaces:
java.io.Serializable,GrantedAuthority
public final class JaasGrantedAuthority extends java.lang.Object implements GrantedAuthority
GrantedAuthoritywhich, in addition to the assigned role, holds the principal that anAuthorityGranterused as a reason to grant this authority.- See Also:
AuthorityGranter, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JaasGrantedAuthority(java.lang.String role, java.security.Principal principal)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)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.java.security.PrincipalgetPrincipal()inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getPrincipal
public java.security.Principal getPrincipal()
-
getAuthority
public java.lang.String getAuthority()
Description copied from interface:GrantedAuthorityIf 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.- Specified by:
getAuthorityin interfaceGrantedAuthority- Returns:
- a representation of the granted authority (or
nullif the granted authority cannot be expressed as aStringwith sufficient precision).
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-