|
|||||||||
| Home >> All >> org >> acegisecurity >> [ adapters overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.acegisecurity.adapters
Class AbstractAdapterAuthenticationToken

java.lang.Objectorg.acegisecurity.providers.AbstractAuthenticationToken
org.acegisecurity.adapters.AbstractAdapterAuthenticationToken
- All Implemented Interfaces:
- AuthByAdapter, org.acegisecurity.Authentication, java.security.Principal, java.io.Serializable
- Direct Known Subclasses:
- PrincipalAcegiUserToken
- public abstract class AbstractAdapterAuthenticationToken
- extends org.acegisecurity.providers.AbstractAuthenticationToken
- implements AuthByAdapter
- extends org.acegisecurity.providers.AbstractAuthenticationToken
Convenience superclass for AuthByAdapter implementations.
- Version:
- $Id: AbstractAdapterAuthenticationToken.java,v 1.5 2005/11/17 00:55:49 benalex Exp $
| Field Summary | |
private GrantedAuthority[] |
authorities
|
private int |
keyHash
|
| Constructor Summary | |
protected |
AbstractAdapterAuthenticationToken()
|
protected |
AbstractAdapterAuthenticationToken(java.lang.String key,
GrantedAuthority[] authorities)
The only way an AbstractAdapterAuthentication should be
constructed. |
| Method Summary | |
boolean |
equals(java.lang.Object obj)
This method tests another Principal object for equality
with this one. |
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(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. |
| 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 |
| Field Detail |
authorities
private GrantedAuthority[] authorities
keyHash
private int keyHash
| Constructor Detail |
AbstractAdapterAuthenticationToken
protected AbstractAdapterAuthenticationToken()
AbstractAdapterAuthenticationToken
protected AbstractAdapterAuthenticationToken(java.lang.String key, GrantedAuthority[] authorities)
- The only way an
AbstractAdapterAuthenticationshould be constructed.
| Method Detail |
setAuthenticated
public void setAuthenticated(boolean ignored)
- Setting is ignored. Always considered authenticated.
- Specified by:
setAuthenticatedin interfaceorg.acegisecurity.Authentication
isAuthenticated
public boolean isAuthenticated()
- Always returns
true.- Specified by:
isAuthenticatedin interfaceorg.acegisecurity.Authentication
getAuthorities
public GrantedAuthority[] getAuthorities()
- Description copied from interface:
org.acegisecurity.Authentication - Set by an
AuthenticationManagerto 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 trustedAuthenticationManager.- Specified by:
getAuthoritiesin interfaceorg.acegisecurity.Authentication
getKeyHash
public int getKeyHash()
- Description copied from interface:
AuthByAdapter - Returns the hash code of the key that was passed to the constructor of
the
AuthByAdapterimplementation. The implementation should convert the value to a hash code at construction time, rather than storing the key itself.- Specified by:
getKeyHashin interfaceAuthByAdapter
isUserInRole
public boolean isUserInRole(java.lang.String role)
- Iterates the granted authorities and indicates whether or not the
specified role is held.
Comparison is based on the
Stringreturned byGrantedAuthority#getAuthority.
equals
public boolean equals(java.lang.Object obj)
- Description copied from interface:
java.security.Principal - This method tests another
Principalobject for equality with this one.- Specified by:
equalsin interfacejava.security.Principal
|
|||||||||
| Home >> All >> org >> acegisecurity >> [ adapters overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC