Class OauthCodeTokenRequestContext

java.lang.Object
io.micronaut.security.oauth2.endpoint.token.request.context.AbstractTokenRequestContext<Map<String,String>,TokenResponse>
io.micronaut.security.oauth2.endpoint.token.request.context.OauthCodeTokenRequestContext
All Implemented Interfaces:
TokenRequestContext<Map<String,String>,TokenResponse>

public class OauthCodeTokenRequestContext extends AbstractTokenRequestContext<Map<String,String>,TokenResponse>
A token request context for sending an authorization code grant request to an OAuth 2.0 provider.
Since:
1.2.0
Author:
James Kleeh
  • Constructor Details

    • OauthCodeTokenRequestContext

      public OauthCodeTokenRequestContext(AuthorizationResponse authorizationResponse, SecureEndpoint tokenEndpoint, OauthClientConfiguration clientConfiguration, @Nullable @Nullable String codeVerifier)
      Parameters:
      authorizationResponse - The authorization response
      tokenEndpoint - The token endpoint
      clientConfiguration - The client configuration
      codeVerifier - The PKCE code_verifier
  • Method Details

    • getGrant

      public Map<String,String> getGrant()
      Returns:
      The grant or body of the request
    • getResponseType

      public io.micronaut.core.type.Argument<TokenResponse> getResponseType()
      Returns:
      The response argument
    • getErrorResponseType

      public io.micronaut.core.type.Argument<?> getErrorResponseType()
      Returns:
      The error response argument
    • getCodeVerifier

      @Nullable public @Nullable String getCodeVerifier()
      Returns:
      The PKCE code verifier
      Since:
      3.9.0