public class RememberMeAuthenticationToken extends AbstractAuthenticationToken
Authentication.
A remembered Authentication must provide a fully valid
Authentication, including the GrantedAuthoritys that apply.
| Constructor and Description |
|---|
RememberMeAuthenticationToken(java.lang.String key,
java.lang.Object principal,
java.util.Collection<? extends GrantedAuthority> authorities)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Object |
getCredentials()
Always returns an empty
String |
int |
getKeyHash() |
java.lang.Object |
getPrincipal()
The identity of the principal being authenticated.
|
int |
hashCode() |
eraseCredentials, getAuthorities, getDetails, getName, isAuthenticated, setAuthenticated, setDetails, toStringpublic RememberMeAuthenticationToken(java.lang.String key,
java.lang.Object principal,
java.util.Collection<? extends GrantedAuthority> authorities)
key - to identify if this object made by an authorised clientprincipal - the principal (typically a UserDetails)authorities - the authorities granted to the principaljava.lang.IllegalArgumentException - if a null was passedpublic java.lang.Object getCredentials()
Stringpublic 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.
Principal being authenticated or the authenticated
principal after authentication.public 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 AbstractAuthenticationToken