Enum OAuth2Parameters.GrantType
java.lang.Object
java.lang.Enum<OAuth2Parameters.GrantType>
org.glassfish.jersey.client.oauth2.OAuth2Parameters.GrantType
- All Implemented Interfaces:
Serializable
,Comparable<OAuth2Parameters.GrantType>
,java.lang.constant.Constable
- Enclosing class:
OAuth2Parameters
Parameter
grant_type
used in the access token request.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUsed to request an access token in the Authorization Code Grant Flow.Used in Client Credentials Flow.Used in Resource Owner Password Credential Grant.Used to refresh an access token in the Authorization Code Grant Flow. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OAuth2Parameters.GrantType
Returns the enum constant of this type with the specified name.static OAuth2Parameters.GrantType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
AUTHORIZATION_CODE
Used to request an access token in the Authorization Code Grant Flow. The parameter key defined by the OAuth2 protocol is equal to the name of this enum value converted to lowercase. -
REFRESH_TOKEN
Used to refresh an access token in the Authorization Code Grant Flow. The parameter key defined by the OAuth2 protocol is equal to the name of this enum value converted to lowercase. -
PASSWORD
Used in Resource Owner Password Credential Grant. The parameter key defined by the OAuth2 protocol is equal to the name of this enum value converted to lowercase. -
CLIENT_CREDENTIALS
Used in Client Credentials Flow. The parameter key defined by the OAuth2 protocol is equal to the name of this enum value converted to lowercase.
-
-
Field Details
-
key
Parameter key name.- See Also:
-
-
Constructor Details
-
GrantType
private GrantType()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-