|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.acegisecurity.providers.AbstractAuthenticationToken
org.acegisecurity.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)
|
GrantedAuthority[] |
getAuthorities()
Set by an AuthenticationManager to indicate the authorities
that the principal has been granted. |
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.acegisecurity.providers.AbstractAuthenticationToken |
|---|
getDetails, getName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.acegisecurity.Authentication |
|---|
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 void setAuthenticated(boolean ignored)
setAuthenticated in interface Authenticationignored - DOCUMENT ME!public boolean isAuthenticated()
true.
isAuthenticated in interface Authenticationpublic GrantedAuthority[] getAuthorities()
AuthenticationAuthenticationManager to indicate the authorities
that the principal has been granted. Note that classes should not rely
on this value as being valid unless it has been set by a trusted
AuthenticationManager.
getAuthorities in interface Authenticationnull
if authentication has not been completedpublic 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 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 boolean equals(Object obj)
equals in interface Principalequals in class AbstractAuthenticationToken
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||