public class CasAuthenticationToken extends AbstractAuthenticationToken implements java.io.Serializable
Authentication.| Constructor and Description |
|---|
CasAuthenticationToken(java.lang.String key,
java.lang.Object principal,
java.lang.Object credentials,
java.util.Collection<? extends GrantedAuthority> authorities,
UserDetails userDetails,
org.jasig.cas.client.validation.Assertion assertion)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
org.jasig.cas.client.validation.Assertion |
getAssertion() |
java.lang.Object |
getCredentials()
The credentials that prove the principal is correct.
|
int |
getKeyHash() |
java.lang.Object |
getPrincipal()
The identity of the principal being authenticated.
|
UserDetails |
getUserDetails() |
int |
hashCode() |
java.lang.String |
toString() |
eraseCredentials, getAuthorities, getDetails, getName, isAuthenticated, setAuthenticated, setDetailspublic CasAuthenticationToken(java.lang.String key,
java.lang.Object principal,
java.lang.Object credentials,
java.util.Collection<? extends GrantedAuthority> authorities,
UserDetails userDetails,
org.jasig.cas.client.validation.Assertion assertion)
key - to identify if this object made by a given
CasAuthenticationProviderprincipal - typically the UserDetails object (cannot be null)credentials - the service/proxy ticket ID from CAS (cannot be
null)authorities - the authorities granted to the user (from the
UserDetailsService) (cannot
be null)userDetails - the user details (from the
UserDetailsService) (cannot
be null)assertion - the assertion returned from the CAS servers. It contains the
principal and how to obtain a proxy ticket for the user.java.lang.IllegalArgumentException - if a null was passedpublic boolean equals(java.lang.Object obj)
equals in interface java.security.Principalequals in class AbstractAuthenticationTokenpublic int hashCode()
hashCode in interface java.security.PrincipalhashCode in class AbstractAuthenticationTokenpublic java.lang.Object getCredentials()
AuthenticationAuthenticationManager. Callers
are expected to populate the credentials.getCredentials in interface AuthenticationPrincipalpublic int getKeyHash()
public java.lang.Object getPrincipal()
Authentication
The AuthenticationManager implementation will often return an
Authentication containing richer information as the principal for use by
the application. Many of the authentication providers will create a
UserDetails object as the principal.
getPrincipal in interface AuthenticationPrincipal being authenticated or the authenticated
principal after authentication.public org.jasig.cas.client.validation.Assertion getAssertion()
public UserDetails getUserDetails()
public java.lang.String toString()
toString in interface java.security.PrincipaltoString in class AbstractAuthenticationToken