Class OpenIdCodeTokenRequestContext

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

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

    • OpenIdCodeTokenRequestContext

      public OpenIdCodeTokenRequestContext(AuthorizationResponse authorizationResponse, OauthRouteUrlBuilder oauthRouteUrlBuilder, SecureEndpoint tokenEndpoint, OauthClientConfiguration clientConfiguration, @Nullable @Nullable String codeVerifier)
      Parameters:
      authorizationResponse - The authorization response
      oauthRouteUrlBuilder - The oauth route URL builder
      tokenEndpoint - The token endpoint
      clientConfiguration - The client configuration
      codeVerifier - The PKCE code_verify
  • Method Details

    • getMediaType

      protected static io.micronaut.http.MediaType getMediaType(OauthClientConfiguration clientConfiguration)
      Resolves the media type for the request body.
      Parameters:
      clientConfiguration - The client configuration
      Returns:
      The media type
    • getGrant

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

      public io.micronaut.core.type.Argument<OpenIdTokenResponse> 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