Class AuthorizationCodeGrant

java.lang.Object
io.micronaut.security.oauth2.grants.AbstractClientSecureGrant
io.micronaut.security.oauth2.grants.AuthorizationCodeGrant
All Implemented Interfaces:
AsMap, SecureGrant

@Introspected public class AuthorizationCodeGrant extends AbstractClientSecureGrant implements SecureGrant, AsMap
Authorization Code Grant Request.
Since:
1.2.0
Author:
Sergio del Amo
See Also:
  • Constructor Details

    • AuthorizationCodeGrant

      public AuthorizationCodeGrant()
  • Method Details

    • getGrantType

      @NonNull public @NonNull String getGrantType()
      Specified by:
      getGrantType in class AbstractClientSecureGrant
      Returns:
      OAuth 2.0 Grant Type.
    • setGrantType

      public void setGrantType(@NonNull @NonNull String grantType)
      Specified by:
      setGrantType in class AbstractClientSecureGrant
      Parameters:
      grantType - OAuth 2.0 Grant Type.
    • getRedirectUri

      @NonNull public @NonNull String getRedirectUri()
      Returns:
      Redirection URI to which the response will be sent.
    • setRedirectUri

      public void setRedirectUri(@NonNull @NonNull String redirectUri)
      Parameters:
      redirectUri - Redirection URI to which the response will be sent.
    • getCode

      @NonNull public @NonNull String getCode()
      Returns:
      An authorization code.
    • setCode

      public void setCode(@NonNull @NonNull String code)
      Parameters:
      code - An authorization code.
    • getCodeVerifier

      @Nullable public @Nullable String getCodeVerifier()
      Returns:
      A PKCE code verifier.
      Since:
      3.9.0
    • setCodeVerifier

      public void setCodeVerifier(@Nullable @Nullable String codeVerifier)
      Parameters:
      codeVerifier - A PKCE code verifier.
      Since:
      3.9.0
    • toMap

      @NonNull public @NonNull Map<String,String> toMap()
      Specified by:
      toMap in interface AsMap
      Overrides:
      toMap in class AbstractClientSecureGrant
      Returns:
      this object as a Map