Class RememberMeAuthenticationToken
- java.lang.Object
- 
- org.springframework.security.authentication.AbstractAuthenticationToken
- 
- org.springframework.security.authentication.RememberMeAuthenticationToken
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.security.Principal,- Authentication,- CredentialsContainer
 
 public class RememberMeAuthenticationToken extends AbstractAuthenticationToken Represents a rememberedAuthentication.A remembered Authenticationmust provide a fully validAuthentication, including theGrantedAuthoritys that apply.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description RememberMeAuthenticationToken(java.lang.String key, java.lang.Object principal, java.util.Collection<? extends GrantedAuthority> authorities)Constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.ObjectgetCredentials()Always returns an emptyStringintgetKeyHash()java.lang.ObjectgetPrincipal()The identity of the principal being authenticated.inthashCode()- 
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationTokeneraseCredentials, getAuthorities, getDetails, getName, isAuthenticated, setAuthenticated, setDetails, toString
 
- 
 
- 
- 
- 
Constructor Detail- 
RememberMeAuthenticationTokenpublic RememberMeAuthenticationToken(java.lang.String key, java.lang.Object principal, java.util.Collection<? extends GrantedAuthority> authorities)Constructor.- Parameters:
- key- to identify if this object made by an authorised client
- principal- the principal (typically a- UserDetails)
- authorities- the authorities granted to the principal
- Throws:
- java.lang.IllegalArgumentException- if a- nullwas passed
 
 
- 
 - 
Method Detail- 
getCredentialspublic java.lang.Object getCredentials() Always returns an emptyString- Returns:
- an empty String
 
 - 
getKeyHashpublic int getKeyHash() 
 - 
getPrincipalpublic java.lang.Object getPrincipal() Description copied from interface:AuthenticationThe identity of the principal being authenticated. In the case of an authentication request with username and password, this would be the username. Callers are expected to populate the principal for an authentication request.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 UserDetailsobject as the principal.- Returns:
- the Principalbeing authenticated or the authenticated principal after authentication.
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Specified by:
- equalsin interface- java.security.Principal
- Overrides:
- equalsin class- AbstractAuthenticationToken
 
 - 
hashCodepublic int hashCode() - Specified by:
- hashCodein interface- java.security.Principal
- Overrides:
- hashCodein class- AbstractAuthenticationToken
 
 
- 
 
-