public class RememberMeAuthenticationToken extends AbstractAuthenticationToken
Authentication
.
A remembered Authentication
must provide a fully valid Authentication
, including the
GrantedAuthority
s that apply.
Constructor and Description |
---|
RememberMeAuthenticationToken(String key,
Object principal,
Collection<? extends GrantedAuthority> authorities)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Object |
getCredentials()
Always returns an empty
String |
int |
getKeyHash() |
Object |
getPrincipal()
The identity of the principal being authenticated.
|
eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
public RememberMeAuthenticationToken(String key, Object principal, 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 principalIllegalArgumentException
- if a null
was passedpublic Object getCredentials()
String
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.
Principal
being authenticated or the authenticated principal after authentication.public boolean equals(Object obj)
equals
in interface Principal
equals
in class AbstractAuthenticationToken