RevokeOAuth2TokenWithIAM
Revokes an OAuth 2.0 refresh token and its associated token chain.
Implements RFC 7009 (OAuth 2.0 Token Revocation) over a SigV4-authenticated endpoint. Invalidates the specified refresh token so that it can no longer be used to obtain new access tokens.
This operation is idempotent – revoking an already-revoked, expired, or otherwise invalid token returns 200 OK with an empty body.
Only refresh tokens (prefix ASOR) are accepted.
Important
Revoking a refresh token does not invalidate access tokens that were previously issued using that refresh token.
Existing access tokens remain valid until they expire (up to 1 hour). To immediately block access,
use an IAM policy with aws:SignInSessionArn to deny the specific session.
Request Syntax
POST /v1/revoke?x-amz-client-auth-method=iam HTTP/1.1
Content-type: application/json
{
"token": "string"
}URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- token
The refresh token to revoke. Must be a refresh token issued by AWS Sign-In (prefix
ASOR). Access tokens are not accepted for revocation.Type: String
Length Constraints: Minimum length of 1. Maximum length of 4096.
Pattern:
ASOR[A-Za-z0-9+/=_\-]+Required: Yes
Response Syntax
HTTP/1.1 200
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
You do not have sufficient access to perform this action.
HTTP Status Code: 400
- InternalServerException
The request processing has failed because of an unknown error, exception or failure with an internal server.
HTTP Status Code: 500
- TooManyRequestsError
Indicates that the principal has exceeded the limit of requests to this API operation.
HTTP Status Code: 429
- ValidationException
The request failed because it contains a syntax error.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: