Class RememberMeAuthenticationToken
java.lang.Object
com.codename1.backend.security.AbstractAuthenticationToken
com.codename1.backend.security.RememberMeAuthenticationToken
- All Implemented Interfaces:
Authentication
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.
-
Constructor Summary
ConstructorsConstructorDescriptionRememberMeAuthenticationToken(String key, Object principal, Collection<? extends GrantedAuthority> authorities) RememberMeAuthenticationToken(String key, Object principal, Collection<? extends GrantedAuthority> authorities, boolean afterSecondFactor) -
Method Summary
Modifier and TypeMethodDescriptionWhat proves the principal is who it says: a password, usually, and null once it has been checked.intThe hash of the key the token was made with.The identity: a username before authentication, and afterwards usually theUserDetailsit was resolved to.booleanWhether the sign-in that issued the cookie passed a second factor.Methods inherited from class AbstractAuthenticationToken
eraseCredentials, getAuthorities, getDetails, getName, isAuthenticated, setAuthenticated, setDetails, toString
-
Constructor Details
-
RememberMeAuthenticationToken
public RememberMeAuthenticationToken(String key, Object principal, Collection<? extends GrantedAuthority> authorities) - Parameters:
key- what identifies the services that made the token
-
RememberMeAuthenticationToken
public RememberMeAuthenticationToken(String key, Object principal, Collection<? extends GrantedAuthority> authorities, boolean afterSecondFactor) - Parameters:
key- what identifies the services that made the tokenafterSecondFactor- whether the cookie was issued by a sign-in that passed a second factor; seeisAfterSecondFactor()
-
-
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
Description copied from interface:AuthenticationWhat proves the principal is who it says: a password, usually, and null once it has been checked. -
getPrincipal
Description copied from interface:AuthenticationThe identity: a username before authentication, and afterwards usually theUserDetailsit was resolved to.
-