public abstract class AbstractAdapterAuthenticationToken extends AbstractAuthenticationToken implements AuthByAdapter
AuthByAdapter implementations.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAdapterAuthenticationToken() |
protected |
AbstractAdapterAuthenticationToken(java.lang.String key,
GrantedAuthority[] authorities)
The only way an
AbstractAdapterAuthentication should be
constructed. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
getKeyHash()
Returns the hash code of the key that was passed to the constructor of the
AuthByAdapter
implementation. |
boolean |
isAuthenticated()
Always returns
true. |
boolean |
isUserInRole(java.lang.String role)
Iterates the granted authorities and indicates whether or not the specified role is held.
|
void |
setAuthenticated(boolean ignored)
Setting is ignored.
|
getAuthorities, getDetails, getName, hashCode, setDetails, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAuthorities, getCredentials, getDetails, getPrincipalprotected AbstractAdapterAuthenticationToken()
protected AbstractAdapterAuthenticationToken(java.lang.String key,
GrantedAuthority[] authorities)
AbstractAdapterAuthentication should be
constructed.key - the key that is hashed and made available via getKeyHash()authorities - the authorities granted to this principalpublic boolean equals(java.lang.Object obj)
equals in interface java.security.Principalequals in class AbstractAuthenticationTokenpublic int getKeyHash()
AuthByAdapterAuthByAdapter
implementation. The implementation should convert the value to a hash code at construction time, rather than
storing the key itself.getKeyHash in interface AuthByAdapterpublic boolean isAuthenticated()
true.isAuthenticated in interface AuthenticationisAuthenticated in class AbstractAuthenticationTokenpublic boolean isUserInRole(java.lang.String role)
Comparison
is based on the String returned by GrantedAuthority.getAuthority().
role - the role being searched for in this object's granted authorities listtrue if the granted authority is held, or false otherwisepublic void setAuthenticated(boolean ignored)
setAuthenticated in interface AuthenticationsetAuthenticated in class AbstractAuthenticationTokenignored - DOCUMENT ME!