Class OAuth2AuthenticationToken

java.lang.Object
com.codename1.backend.security.AbstractAuthenticationToken
com.codename1.backend.security.oauth2.client.OAuth2AuthenticationToken
All Implemented Interfaces:
Authentication

public final class OAuth2AuthenticationToken extends AbstractAuthenticationToken

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 Details

  • Method Details

    • getPrincipal

      public OAuth2User getPrincipal()
      Description copied from interface: Authentication
      The identity: a username before authentication, and afterwards usually the UserDetails it was resolved to.
    • getCredentials

      public Object getCredentials()
      Description copied from interface: Authentication
      What proves the principal is who it says: a password, usually, and null once it has been checked.
    • getName

      public String getName()
      Description copied from interface: Authentication
      The principal's name.
      Specified by:
      getName in interface Authentication
      Overrides:
      getName in class AbstractAuthenticationToken
    • getAuthorizedClientRegistrationId

      public String getAuthorizedClientRegistrationId()
      The registration the user signed in through.