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/revoke
API.The
/auth/token/revoke
API revokes access/refresh tokens. The API processes the request in the order shown below.-
When the
accessTokenIdentifier
request 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
refreshTokenIdentifier
request 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
clientIdentifier
request parameter and thesubject
request 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
clientIdentifier
request parameter is given and thesubject
request 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
subject
request parameter is given and theclientIdentifier
request 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 String
getAccessTokenIdentifier()
Get the identifier of an access token to revoke.String
getClientIdentifier()
Get the identifier of a client.String
getRefreshTokenIdentifier()
Get the identifier of a refresh token to revoke.String
getSubject()
Get the subject of a resource owner.TokenRevokeRequest
setAccessTokenIdentifier(String identifier)
Set the identifier of an access token to revoke.TokenRevokeRequest
setClientIdentifier(String identifier)
Set the identifier of a client.TokenRevokeRequest
setRefreshTokenIdentifier(String identifier)
Set the identifier of a refresh token to revoke.TokenRevokeRequest
setSubject(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:
this
instance.
-
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:
this
instance.
-
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:
this
instance.
-
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:
this
object.
-
-