Enum Class GrantType

java.lang.Object
java.lang.Enum<GrantType>
io.micronaut.security.oauth2.grants.GrantType
All Implemented Interfaces:
Serializable, Comparable<GrantType>, Constable

public enum GrantType extends Enum<GrantType>
The OAuth 2.0 grant types.
Since:
1.2.0
Author:
Sergio del Amo
See Also:
  • Enum Constant Details

    • CLIENT_CREDENTIALS

      public static final GrantType CLIENT_CREDENTIALS
      The Client Credentials grant type is used by clients to obtain an access token outside of the context of a user. This is typically used by clients to access resources about themselves rather than to access a user's resources.
      See Also:
    • AUTHORIZATION_CODE

      public static final GrantType AUTHORIZATION_CODE
      The Authorization Code grant type is used by confidential and public clients to exchange an authorization code for an access token.
      See Also:
    • REFRESH_TOKEN

      public static final GrantType REFRESH_TOKEN
      OAuth 2.0 refresh tokens. Refresh tokens are issued to the client by the authorization server and are used to obtain a new access token when the current access token becomes invalid or expires, or to obtain additional access tokens with identical or narrower scope.
      See Also:
    • IMPLICIT

      public static final GrantType IMPLICIT
      The implicit grant is a simplified authorization code flow optimized for clients implemented in a browser using a scripting language such as JavaScript. In the implicit flow, instead of issuing the client an authorization code, the client is issued an access token directly
      See Also:
    • PASSWORD

      public static final GrantType PASSWORD
      The Password grant type is used by first-party clients to exchange a user's credentials for an access token. Resource Owner Password Credentials
    • JWT_BEARER_ASSERTION_GRANT

      public static final GrantType JWT_BEARER_ASSERTION_GRANT
    • SAML_2_0_BEARER_ASSERTION_GRANT

      public static final GrantType SAML_2_0_BEARER_ASSERTION_GRANT
  • Method Details

    • values

      public static GrantType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GrantType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<GrantType>
      Returns:
      The OAuth 2.0. Grant Type