Class TokenRevokeRequest
- java.lang.Object
-
- com.authlete.common.dto.TokenRevokeRequest
-
- All Implemented Interfaces:
Serializable
public class TokenRevokeRequest extends Object implements Serializable
Request to Authlete's/auth/token/revokeAPI.The
/auth/token/revokeAPI revokes access/refresh tokens. The API processes the request in the order shown below.-
When the
accessTokenIdentifierrequest parameter is given, the access token identified by the identifier (and the corresponding refresh token) is revoked. Other request parameters are ignored and the revocation process ends here.
-
When the
refreshTokenIdentifierrequest parameter is given, the refresh token identified by the identifier (and the corresponding access token) is revoked. Other request parameters are ignored and the revocation process ends here.
-
When both the
clientIdentifierrequest parameter and thesubjectrequest parameter are given, access/refresh tokens whose client and subject match the specified values are revoked. Other request parameters are ignored and the revocation process ends here.
-
When the
clientIdentifierrequest parameter is given and thesubjectrequest parameter is not given, access/refresh tokens whose client matches the specified value are revoked. Other request parameters are ignored and the revocation process ends here.
-
When the
subjectrequest parameter is given and theclientIdentifierrequest parameter is not given, access/refresh tokens whose subject matches the specified value are revoked. Other request parameters are ignored and the revocation process ends here.
-
In other cases, that is, when none of the request parameters are given, the API returns
400 Bad Request.
- Since:
- 3.26, Authlete 2.2.29
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TokenRevokeRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAccessTokenIdentifier()Get the identifier of an access token to revoke.StringgetClientIdentifier()Get the identifier of a client.StringgetRefreshTokenIdentifier()Get the identifier of a refresh token to revoke.StringgetSubject()Get the subject of a resource owner.TokenRevokeRequestsetAccessTokenIdentifier(String identifier)Set the identifier of an access token to revoke.TokenRevokeRequestsetClientIdentifier(String identifier)Set the identifier of a client.TokenRevokeRequestsetRefreshTokenIdentifier(String identifier)Set the identifier of a refresh token to revoke.TokenRevokeRequestsetSubject(String subject)Set the subject of a resource owner.
-
-
-
Method Detail
-
getAccessTokenIdentifier
public String getAccessTokenIdentifier()
Get the identifier of an access token to revoke.The hash of an access token is recognized as an identifier as well as the access token itself.
- Returns:
- The identifier of an access token to revoke.
-
setAccessTokenIdentifier
public TokenRevokeRequest setAccessTokenIdentifier(String identifier)
Set the identifier of an access token to revoke.The hash of an access token is recognized as an identifier as well as the access token itself.
- Parameters:
identifier- The identifier of an access token to revoke.- Returns:
thisinstance.
-
getRefreshTokenIdentifier
public String getRefreshTokenIdentifier()
Get the identifier of a refresh token to revoke.The hash of a refresh token is recognized as an identifier as well as the refresh token itself.
- Returns:
- The identifier of a refresh token to revoke.
-
setRefreshTokenIdentifier
public TokenRevokeRequest setRefreshTokenIdentifier(String identifier)
Set the identifier of a refresh token to revoke.The hash of a refresh token is recognized as an identifier as well as the refresh token itself.
- Parameters:
identifier- The identifier of a refresh token to revoke.- Returns:
thisinstance.
-
getClientIdentifier
public String getClientIdentifier()
Get the identifier of a client.Both the numeric client ID and the alias are recognized as an identifier of a client.
- Returns:
- The identifier of a client.
-
setClientIdentifier
public TokenRevokeRequest setClientIdentifier(String identifier)
Set the identifier of a client.Both the numeric client ID and the alias are recognized as an identifier of a client.
- Parameters:
identifier- The identifier of a client.- Returns:
thisinstance.
-
getSubject
public String getSubject()
Get the subject of a resource owner.- Returns:
- The subject of a resource owner.
-
setSubject
public TokenRevokeRequest setSubject(String subject)
Set the subject of a resource owner.- Parameters:
subject- The subject of a resource owner.- Returns:
thisobject.
-
-