Package com.authlete.common.dto
Enum GMResponse.Action
- java.lang.Object
-
- java.lang.Enum<GMResponse.Action>
-
- com.authlete.common.dto.GMResponse.Action
-
- All Implemented Interfaces:
Serializable
,Comparable<GMResponse.Action>
- Enclosing class:
- GMResponse
public static enum GMResponse.Action extends Enum<GMResponse.Action>
The next action the service implementation should take.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTHLETE_ERROR
An error occurred on Authlete side.CALLER_ERROR
The API call is wrong.FORBIDDEN
The access token cannot be used to manage the grant ID.NO_CONTENT
The access token is valid and the grant has been revoked successfully.NOT_FOUND
The grant ID was not found.OK
The access token is valid and information about the grant has been retrieved successfully.UNAUTHORIZED
The grant management request includes no access token or the access token is invalid.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GMResponse.Action
valueOf(String name)
Returns the enum constant of this type with the specified name.static GMResponse.Action[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OK
public static final GMResponse.Action OK
The access token is valid and information about the grant has been retrieved successfully. The implementation of the endpoint should return"200 OK"
to the client application with the content type"application/json"
.
-
NO_CONTENT
public static final GMResponse.Action NO_CONTENT
The access token is valid and the grant has been revoked successfully. The implementation of the endpoint should return204 No Content
to the client application.
-
UNAUTHORIZED
public static final GMResponse.Action UNAUTHORIZED
The grant management request includes no access token or the access token is invalid. The implementation of the endpoint should return401 Unauthorized
to the client application.
-
FORBIDDEN
public static final GMResponse.Action FORBIDDEN
The access token cannot be used to manage the grant ID. The implementation of the endpoint should return403 Forbidden
to the client application.
-
NOT_FOUND
public static final GMResponse.Action NOT_FOUND
The grant ID was not found. The implementation of the endpoint should return"404 Not Found"
to the client application.
-
CALLER_ERROR
public static final GMResponse.Action CALLER_ERROR
The API call is wrong. For example, thegmAction
request parameter is not included. The implementation of the endpoint should be fixed. It's up to the implementation how to respond to the client application. A simple implementation would return500 Internal Server Error
.
-
AUTHLETE_ERROR
public static final GMResponse.Action AUTHLETE_ERROR
An error occurred on Authlete side. It's up to the the implementation of the endpoint how to respond to the client application. A simple implementation would return"500 Internal Server Error"
.
-
-
Method Detail
-
values
public static GMResponse.Action[] 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 (GMResponse.Action c : GMResponse.Action.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GMResponse.Action 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
-
-