Class OAuth2AuthenticationToken
java.lang.Object
com.codename1.backend.security.AbstractAuthenticationToken
com.codename1.backend.security.oauth2.client.OAuth2AuthenticationToken
- All Implemented Interfaces:
Authentication
A user who signed in through an identity provider.
This is the authentication of the request that completed the sign-in. The
session keeps who signed in -- the name and the authorities -- and the
requests that follow see those, with the provider's id and the user's
attributes in getDetails() as a map.
-
Constructor Summary
ConstructorsConstructorDescriptionOAuth2AuthenticationToken(OAuth2User principal, Collection<? extends GrantedAuthority> authorities, String authorizedClientRegistrationId) -
Method Summary
Modifier and TypeMethodDescriptionThe registration the user signed in through.What proves the principal is who it says: a password, usually, and null once it has been checked.getName()The principal's name.The identity: a username before authentication, and afterwards usually theUserDetailsit was resolved to.Methods inherited from class AbstractAuthenticationToken
eraseCredentials, getAuthorities, getDetails, isAuthenticated, setAuthenticated, setDetails, toString
-
Constructor Details
-
OAuth2AuthenticationToken
public OAuth2AuthenticationToken(OAuth2User principal, Collection<? extends GrantedAuthority> authorities, String authorizedClientRegistrationId)
-
-
Method Details
-
getPrincipal
Description copied from interface:AuthenticationThe identity: a username before authentication, and afterwards usually theUserDetailsit was resolved to. -
getCredentials
Description copied from interface:AuthenticationWhat proves the principal is who it says: a password, usually, and null once it has been checked. -
getName
Description copied from interface:AuthenticationThe principal's name.- Specified by:
getNamein interfaceAuthentication- Overrides:
getNamein classAbstractAuthenticationToken
-
getAuthorizedClientRegistrationId
The registration the user signed in through.
-