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, setDetails
public 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 CasAuthenticationProvider
principal
- 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 Principal
equals
in class AbstractAuthenticationToken
public Object getCredentials()
Authentication
AuthenticationManager
. Callers are expected to populate the credentials.getCredentials
in interface Authentication
Principal
public 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 Authentication
Principal
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 Principal
toString
in class AbstractAuthenticationToken