|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.authentication.AnonymousAuthenticationToken
public class AnonymousAuthenticationToken
Represents an anonymous Authentication.
| Constructor Summary | |
|---|---|
AnonymousAuthenticationToken(String key,
Object principal,
GrantedAuthority[] authorities)
Deprecated. use the second constructor |
|
AnonymousAuthenticationToken(String key,
Object principal,
List<GrantedAuthority> authorities)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
Object |
getCredentials()
Always returns an empty String |
int |
getKeyHash()
|
Object |
getPrincipal()
The identity of the principal being authenticated. |
| Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken |
|---|
eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AnonymousAuthenticationToken(String key,
Object principal,
GrantedAuthority[] authorities)
public AnonymousAuthenticationToken(String key,
Object principal,
List<GrantedAuthority> authorities)
key - to identify if this object made by an authorised clientprincipal - the principal (typically a UserDetails)authorities - the authorities granted to the principal
IllegalArgumentException - if a null was passed| Method Detail |
|---|
public boolean equals(Object obj)
equals in interface Principalequals in class AbstractAuthenticationTokenpublic Object getCredentials()
String
getCredentials in interface Authenticationpublic 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 AuthenticationPrincipal being authenticated or the authenticated principal after authentication.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||