Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public class AnonymousAuthenticationToken
- Object
- AbstractAuthenticationToken
- AnonymousAuthenticationToken
ImplementsAuthentication
Who a request is from when nobody signed in: a principal called
anonymousUser holding ROLE_ANONYMOUS, so authorization rules always have
someone to ask about. authenticated() does not accept it.Constructors
public AnonymousAuthenticationToken(String key, Object principal, Collection<? extends GrantedAuthority> authorities) |
Methods
public int getKeyHash() | The hash of the key the token was made with. |
public Object getCredentials() | What proves the principal is who it says: a password, usually, and null once it has been checked. |
public Object getPrincipal() | The identity: a username before authentication, and afterwards usually the UserDetails it was resolved to. |
Inherited methods
Constructor details
AnonymousAuthenticationToken
public AnonymousAuthenticationToken(String key, Object principal, Collection<? extends GrantedAuthority> authorities)Parameters
keyString- what identifies the filter that made the token
principalObject- Not documented.
authoritiesCollection<? extends GrantedAuthority>- Not documented.
Method details
getKeyHash
public int getKeyHash()The hash of the key the token was made with.
getCredentials
public Object getCredentials()What proves the principal is who it says: a password, usually, and null
once it has been checked.
getPrincipal
public Object getPrincipal()The identity: a username before authentication, and afterwards usually the
UserDetails it was
resolved to.