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.

The redirect_uri parameter of the token request is built from the application's own callback route via OauthRouteUrlBuilder, never from the state parameter received in the authorization response, which is controlled by the party redirecting the browser to the callback (see RFC 6749 sections 4.1.3 and 10.6).

Since:
1.2.0
Author:
James Kleeh
  • Constructor Details

  • 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

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