public enum GrantType extends Enum<GrantType>
grant_type.| Enum Constant and Description |
|---|
AUTHORIZATION_CODE
"authorization_code" (1), a grant_type to request
an access token and/or an ID token, and optionally a refresh token,
using an authorization code. |
CLIENT_CREDENTIALS
"client_credentials" (4), a grant_type to request
an access token using a client's credentials. |
IMPLICIT
"implicit" (2), representing Implicit Flow. |
PASSWORD
"password" (3), a grant_type to request an access token
using a resource owner's username and password. |
REFRESH_TOKEN
"refresh_token" (5), a grant_type to request an access
token, and optionally an ID token and/or a refresh token, using a
refresh token. |
| Modifier and Type | Method and Description |
|---|---|
static GrantType |
getByValue(short value)
Find an instance of this enum by a value.
|
short |
getValue()
Get the integer representation of this enum instance.
|
static GrantType |
parse(String grantType)
Convert
String to GrantType. |
static GrantType[] |
toArray(int bits) |
static int |
toBits(EnumSet<GrantType> set) |
static EnumSet<GrantType> |
toSet(GrantType[] array) |
static EnumSet<GrantType> |
toSet(int bits) |
String |
toString() |
static GrantType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GrantType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GrantType AUTHORIZATION_CODE
"authorization_code" (1), a grant_type to request
an access token and/or an ID token, and optionally a refresh token,
using an authorization code.public static final GrantType IMPLICIT
"implicit" (2), representing Implicit Flow.
This is not a value for grant_type but listed in this enum
because OpenID Connect Dynamic Client Registration 1.0 uses "implicit" as a value for grant_types of client metadata.
public static final GrantType PASSWORD
"password" (3), a grant_type to request an access token
using a resource owner's username and password.public static final GrantType CLIENT_CREDENTIALS
"client_credentials" (4), a grant_type to request
an access token using a client's credentials.public static final GrantType REFRESH_TOKEN
"refresh_token" (5), a grant_type to request an access
token, and optionally an ID token and/or a refresh token, using a
refresh token.public static GrantType[] values()
for (GrantType c : GrantType.values()) System.out.println(c);
public static GrantType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic short getValue()
public static GrantType getByValue(short value)
value - The integer representation of the instance to find.null if not found.public static GrantType parse(String grantType)
String to GrantType.grantType - A grant type. For example, "authorization_code".GrantType instance, or null.public static GrantType[] toArray(int bits)
Copyright © 2017. All rights reserved.