Enum Class Oauth2GrantType
- All Implemented Interfaces:
Serializable,Comparable<Oauth2GrantType>,Constable
授权类型 see rfc6749
section-1.3
- Since:
- 1.0
- Author:
- CJ (power4j@outlook.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAUTHORIZATION_CODECLIENT_CREDENTIALSIMPLICITPASSWORDREFRESH_TOKEN -
Method Summary
Modifier and TypeMethodDescriptiongetValue()static Oauth2GrantType解析static Oauth2GrantTypeparseOrDefault(String value, Oauth2GrantType defValue) 解析static Oauth2GrantTypeparseOrNull(String value) 解析static Oauth2GrantTypeparseOrThrow(String value, Function<String, RuntimeException> thrower) 解析static Oauth2GrantTypeReturns the enum constant of this class with the specified name.static Oauth2GrantType[]values()Returns an array containing the constants of this enum class, in the order they are declared.valueSet()
-
Enum Constant Details
-
AUTHORIZATION_CODE
AUTHORIZATION_CODE -
IMPLICIT
IMPLICIT -
REFRESH_TOKEN
REFRESH_TOKEN -
CLIENT_CREDENTIALS
CLIENT_CREDENTIALS -
PASSWORD
PASSWORD
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getValue
-
valueSet
-
parseOrDefault
@Nullable public static Oauth2GrantType parseOrDefault(@Nullable String value, @Nullable Oauth2GrantType defValue) 解析- Parameters:
value- 被解析的数据,可以是nulldefValue- 默认值- Returns:
- 如果解析失败返回默认值
-
parseOrNull
解析- Parameters:
value- 被解析的数据- Returns:
- 如果解析失败返回 null
-
parseOrThrow
解析- Parameters:
value- 被解析的数据thrower- 异常抛出器- Returns:
- 如果解析失败抛出异常
-
parse
解析- Parameters:
value- 被解析的数据- Returns:
- 如果解析失败抛出 IllegalArgumentException
- Throws:
IllegalArgumentException
-