public class CasAuthenticationToken extends AbstractAuthenticationToken implements Serializable
Authentication.| Constructor and Description |
|---|
CasAuthenticationToken(String key,
Object principal,
Object credentials,
Collection<? extends GrantedAuthority> authorities,
UserDetails userDetails,
org.jasig.cas.client.validation.Assertion assertion)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
org.jasig.cas.client.validation.Assertion |
getAssertion() |
Object |
getCredentials()
The credentials that prove the principal is correct.
|
int |
getKeyHash() |
Object |
getPrincipal()
The identity of the principal being authenticated.
|
UserDetails |
getUserDetails() |
String |
toString() |
eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetailspublic CasAuthenticationToken(String key, Object principal, Object credentials, 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.IllegalArgumentException - if a null was passedpublic boolean equals(Object obj)
equals in interface Principalequals in class AbstractAuthenticationTokenpublic Object getCredentials()
AuthenticationAuthenticationManager. Callers are expected to populate the credentials.getCredentials in interface AuthenticationPrincipalpublic int getKeyHash()
public 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 String toString()
toString in interface PrincipaltoString in class AbstractAuthenticationToken