Enum Class GrantType

java.lang.Object
java.lang.Enum<GrantType>
com.atlassian.oauth2.client.api.storage.config.GrantType
All Implemented Interfaces:
Serializable, Comparable<GrantType>, Constable

public enum GrantType extends Enum<GrantType>
Supported OAuth 2.0 grant types.
Since:
4.0.0
See Also:
  • Enum Constant Details

    • AUTHORIZATION_CODE_GRANT

      public static final GrantType AUTHORIZATION_CODE_GRANT
    • CLIENT_CREDENTIALS_GRANT

      public static final GrantType CLIENT_CREDENTIALS_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
    • forValue

      public static GrantType forValue(String value)
    • defaultGrantType

      public static GrantType defaultGrantType()
    • getByName

      public static Optional<GrantType> getByName(String name)
    • getByNameOrDefault

      public static GrantType getByNameOrDefault(String name)
    • orDefaultGrantType

      public static GrantType orDefaultGrantType(GrantType grantType)
    • getName

      public String getName()
      The name of the grant type as defined in the OAuth 2.0 specification.
      Returns:
      the grant type name
      See Also:
    • requiresAuthorization

      public boolean requiresAuthorization()
      Whether the grant type requires an authorization, also known as the 3LO (3-legged OAuth) flow.