Class AbstractClientSecureGrant

java.lang.Object
io.micronaut.security.oauth2.grants.AbstractClientSecureGrant
All Implemented Interfaces:
AsMap, SecureGrant
Direct Known Subclasses:
AuthorizationCodeGrant, ClientCredentialsGrant, PasswordGrant

public abstract class AbstractClientSecureGrant extends Object implements SecureGrant, AsMap
Base class for SecureGrant implementations.
Since:
3.4.2
Author:
Álvaro Sánchez-Mariscal
  • Field Details

    • clientId

      protected String clientId
    • clientSecret

      protected String clientSecret
  • Constructor Details

    • AbstractClientSecureGrant

      public AbstractClientSecureGrant()
  • Method Details

    • getGrantType

      @NonNull public abstract @NonNull String getGrantType()
      Returns:
      OAuth 2.0 Grant Type.
    • setGrantType

      public abstract void setGrantType(@NonNull @NonNull String grantType)
      Parameters:
      grantType - OAuth 2.0 Grant Type.
    • getClientId

      @Nullable public @Nullable String getClientId()
      Returns:
      The application's Client identifier.
    • setClientId

      public void setClientId(@Nullable @Nullable String clientId)
      Description copied from interface: SecureGrant
      Sets the client id in the grant.
      Specified by:
      setClientId in interface SecureGrant
      Parameters:
      clientId - Application's Client identifier.
    • setClientSecret

      public void setClientSecret(@Nullable @Nullable String clientSecret)
      Description copied from interface: SecureGrant
      Sets the client secret in the grant.
      Specified by:
      setClientSecret in interface SecureGrant
      Parameters:
      clientSecret - Application's Client clientSecret.
    • getClientSecret

      @Nullable public @Nullable String getClientSecret()
      Returns:
      The application's Client clientSecret.
    • toMap

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