public class AnonymousAuthenticationToken extends AbstractAuthenticationToken implements Serializable
Authentication.| Constructor and Description |
|---|
AnonymousAuthenticationToken(String key,
Object principal,
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.
|
getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toStringpublic AnonymousAuthenticationToken(String key, Object principal, 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 boolean equals(Object obj)
equals in interface Principalequals in class AbstractAuthenticationTokenpublic Object getCredentials()
StringgetCredentials in interface Authenticationpublic int getKeyHash()
public Object getPrincipal()
AuthenticationgetPrincipal in interface AuthenticationPrincipal being authenticatedCopyright © 2021. All rights reserved.