Enum OAuth2Parameters.GrantType
- java.lang.Object
-
- java.lang.Enum<OAuth2Parameters.GrantType>
-
- org.glassfish.jersey.client.oauth2.OAuth2Parameters.GrantType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<OAuth2Parameters.GrantType>
- Enclosing class:
- OAuth2Parameters
public static enum OAuth2Parameters.GrantType extends java.lang.Enum<OAuth2Parameters.GrantType>
Parametergrant_type
used in the access token request.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTHORIZATION_CODE
Used to request an access token in the Authorization Code Grant Flow.CLIENT_CREDENTIALS
Used in Client Credentials Flow.PASSWORD
Used in Resource Owner Password Credential Grant.REFRESH_TOKEN
Used to refresh an access token in the Authorization Code Grant Flow.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
key
Parameter key name.
-
Constructor Summary
Constructors Modifier Constructor Description private
GrantType()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OAuth2Parameters.GrantType
valueOf(java.lang.String name)
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 Detail
-
AUTHORIZATION_CODE
public static final OAuth2Parameters.GrantType 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
public static final OAuth2Parameters.GrantType 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
public static final OAuth2Parameters.GrantType 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
public static final OAuth2Parameters.GrantType 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 Detail
-
key
public static final java.lang.String key
Parameter key name.- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static OAuth2Parameters.GrantType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (OAuth2Parameters.GrantType c : OAuth2Parameters.GrantType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OAuth2Parameters.GrantType valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-