Class UsernamePasswordAuthenticationToken
java.lang.Object
com.codename1.backend.security.AbstractAuthenticationToken
com.codename1.backend.security.UsernamePasswordAuthenticationToken
- All Implemented Interfaces:
Authentication
A username and password: as a client presented them, or -- with authorities --
as an
AuthenticationProvider accepted them.-
Constructor Summary
ConstructorsConstructorDescriptionUsernamePasswordAuthenticationToken(Object principal, Object credentials) A token still to be checked.UsernamePasswordAuthenticationToken(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities) A token that has been checked. -
Method Summary
Modifier and TypeMethodDescriptionauthenticated(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities) A token that has been checked.voidDrops the secret this token carried, once it has been checked.What proves the principal is who it says: a password, usually, and null once it has been checked.The identity: a username before authentication, and afterwards usually theUserDetailsit was resolved to.voidsetAuthenticated(boolean isAuthenticated) Marks the token trusted or not.unauthenticated(Object principal, Object credentials) A token still to be checked.Methods inherited from class AbstractAuthenticationToken
getAuthorities, getDetails, getName, isAuthenticated, setDetails, toString
-
Constructor Details
-
UsernamePasswordAuthenticationToken
-
UsernamePasswordAuthenticationToken
public UsernamePasswordAuthenticationToken(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities) A token that has been checked. Only code that authenticated the principal may build one.
-
-
Method Details
-
unauthenticated
public static UsernamePasswordAuthenticationToken unauthenticated(Object principal, Object credentials) A token still to be checked. -
authenticated
public static UsernamePasswordAuthenticationToken authenticated(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities) A token that has been checked. -
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. -
setAuthenticated
public void setAuthenticated(boolean isAuthenticated) Description copied from interface:AuthenticationMarks the token trusted or not. Implementations refusetruefrom outside: a trusted token is made by a constructor that says so.- Specified by:
setAuthenticatedin interfaceAuthentication- Overrides:
setAuthenticatedin classAbstractAuthenticationToken
-
eraseCredentials
public void eraseCredentials()Description copied from class:AbstractAuthenticationTokenDrops the secret this token carried, once it has been checked. Called byProviderManageron a token it accepted.- Overrides:
eraseCredentialsin classAbstractAuthenticationToken
-