Package com.authlete.common.dto
Enum TokenFailRequest.Reason
- java.lang.Object
-
- java.lang.Enum<TokenFailRequest.Reason>
-
- com.authlete.common.dto.TokenFailRequest.Reason
-
- All Implemented Interfaces:
Serializable
,Comparable<TokenFailRequest.Reason>
- Enclosing class:
- TokenFailRequest
public static enum TokenFailRequest.Reason extends Enum<TokenFailRequest.Reason>
Failure reasons of token requests.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INVALID_RESOURCE_OWNER_CREDENTIALS
The resource owner's credentials (username
andpassword
) contained in the token request whose flow is "Resource Owner Password Credentials") are invalid.INVALID_TARGET
The requested resource is invalid, missing, unknown, or malformed.UNKNOWN
Unknown reason.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TokenFailRequest.Reason
valueOf(String name)
Returns the enum constant of this type with the specified name.static TokenFailRequest.Reason[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final TokenFailRequest.Reason UNKNOWN
Unknown reason.Using this reason will result in
"error":"server_error"
.
-
INVALID_RESOURCE_OWNER_CREDENTIALS
public static final TokenFailRequest.Reason INVALID_RESOURCE_OWNER_CREDENTIALS
The resource owner's credentials (username
andpassword
) contained in the token request whose flow is "Resource Owner Password Credentials") are invalid.Using this reason will result in
"error":"invalid_request"
.
-
INVALID_TARGET
public static final TokenFailRequest.Reason INVALID_TARGET
The requested resource is invalid, missing, unknown, or malformed. See "Resource Indicators for OAuth 2.0" for details.Using this reason will result in
"error":"invalid_target"
.- Since:
- 2.62
-
-
Method Detail
-
values
public static TokenFailRequest.Reason[] 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 (TokenFailRequest.Reason c : TokenFailRequest.Reason.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TokenFailRequest.Reason valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-