Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public class RememberMeAuthenticationToken
- Object
- AbstractAuthenticationToken
- RememberMeAuthenticationToken
ImplementsAuthentication
Who a request is from when the user was recognized by a remember-me cookie rather than signing in during this session.
It is authenticated, so authenticated() accepts it. fullyAuthenticated()
and isFullyAuthenticated() do not: what should ask for the password again
– changing it, a payment – uses those. A session that started from the
cookie keeps this type for as long as it lasts.
Constructors
Methods
public int getKeyHash() | The hash of the key the token was made with. |
public boolean isAfterSecondFactor() | Whether the sign-in that issued the cookie passed a second factor. |
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
RememberMeAuthenticationToken
public RememberMeAuthenticationToken(String key, Object principal, Collection<? extends GrantedAuthority> authorities)Parameters
keyString- what identifies the services that made the token
principalObject- Not documented.
authoritiesCollection<? extends GrantedAuthority>- Not documented.
RememberMeAuthenticationToken
public RememberMeAuthenticationToken(String key, Object principal, Collection<? extends GrantedAuthority> authorities, boolean afterSecondFactor)Parameters
keyString- what identifies the services that made the token
principalObject- Not documented.
authoritiesCollection<? extends GrantedAuthority>- Not documented.
afterSecondFactorboolean- whether the cookie was issued by a sign-in
that passed a second factor; see
isAfterSecondFactor
Method details
getKeyHash
public int getKeyHash()The hash of the key the token was made with.
isAfterSecondFactor
public boolean isAfterSecondFactor()Whether the sign-in that issued the cookie passed a second factor. On a
chain that asks for one, a user who has a second factor is recognized
by their cookie only when this is true.
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.