| 
Spring Security Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.security.providers.AbstractAuthenticationToken
org.springframework.security.adapters.AbstractAdapterAuthenticationToken
public abstract class AbstractAdapterAuthenticationToken
Convenience superclass for AuthByAdapter implementations.
| Constructor Summary | |
|---|---|
protected  | 
AbstractAdapterAuthenticationToken()
 | 
protected  | 
AbstractAdapterAuthenticationToken(String key,
                                   GrantedAuthority[] authorities)
The only way an AbstractAdapterAuthentication should be
 constructed. | 
| Method Summary | |
|---|---|
 boolean | 
equals(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(String role)
Iterates the granted authorities and indicates whether or not the specified role is held.  | 
 void | 
setAuthenticated(boolean ignored)
Setting is ignored.  | 
| Methods inherited from class org.springframework.security.providers.AbstractAuthenticationToken | 
|---|
getAuthorities, getDetails, getName, hashCode, setDetails, toString | 
| Methods inherited from class java.lang.Object | 
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface org.springframework.security.Authentication | 
|---|
getAuthorities, getCredentials, getDetails, getPrincipal | 
| Methods inherited from interface java.security.Principal | 
|---|
getName, hashCode, toString | 
| Constructor Detail | 
|---|
protected AbstractAdapterAuthenticationToken()
protected AbstractAdapterAuthenticationToken(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 principal| Method Detail | 
|---|
public boolean equals(Object obj)
equals in interface 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(String role)
Comparison
 is based on the String returned by GrantedAuthority.getAuthority().
role - the role being searched for in this object's granted authorities list
true if the granted authority is held, or false otherwisepublic void setAuthenticated(boolean ignored)
setAuthenticated in interface AuthenticationsetAuthenticated in class AbstractAuthenticationTokenignored - DOCUMENT ME!
  | 
Spring Security Framework | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||