Interface OauthAuthenticationMapper


public interface OauthAuthenticationMapper
A contract for mapping an OAuth 2.0 token endpoint response to a AuthenticationResponse object.
Since:
1.2.0
Author:
James Kleeh
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    A key to be stored in the user details to store the access token returned by the provider.
    static final String
    A key to be stored in the user details to denote which provider authenticated the user.
    static final String
    A key to be stored in the user details to store the refresh token returned by the provider.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.reactivestreams.Publisher<AuthenticationResponse>
    createAuthenticationResponse(TokenResponse tokenResponse, @Nullable State state)
    Convert the token response and state into an authentication response.
  • Field Details

    • PROVIDER_KEY

      static final String PROVIDER_KEY
      A key to be stored in the user details to denote which provider authenticated the user.
      See Also:
    • ACCESS_TOKEN_KEY

      static final String ACCESS_TOKEN_KEY
      A key to be stored in the user details to store the access token returned by the provider.
      See Also:
    • REFRESH_TOKEN_KEY

      static final String REFRESH_TOKEN_KEY
      A key to be stored in the user details to store the refresh token returned by the provider.
      See Also:
  • Method Details

    • createAuthenticationResponse

      org.reactivestreams.Publisher<AuthenticationResponse> createAuthenticationResponse(TokenResponse tokenResponse, @Nullable @Nullable State state)
      Convert the token response and state into an authentication response.
      Parameters:
      tokenResponse - The token response
      state - The OAuth state
      Returns:
      The authentication response