AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Revokes all of the access tokens generated by, and at the same time as, the specified
refresh token. After a token is revoked, you can't use the revoked token to access
Amazon Cognito user APIs, or to authorize access to your resource server.
Amazon Cognito doesn't evaluate Identity and Access Management (IAM) policies in requests
for this API operation. For this operation, you can't use IAM credentials to authorize
requests, and you can't grant IAM permissions in policies. For more information about
authorization models in Amazon Cognito, see Using
the Amazon Cognito user pools API and user pool endpoints.
For .NET Core this operation is only available in asynchronous form. Please refer to RevokeTokenAsync.
Namespace: Amazon.CognitoIdentityProvider
Assembly: AWSSDK.CognitoIdentityProvider.dll
Version: 3.x.y.z
public virtual RevokeTokenResponse RevokeToken( RevokeTokenRequest request )
Container for the necessary parameters to execute the RevokeToken service method.
Exception | Condition |
---|---|
ForbiddenException | This exception is thrown when WAF doesn't allow your request based on a web ACL that's associated with your user pool. |
InternalErrorException | This exception is thrown when Amazon Cognito encounters an internal error. |
InvalidParameterException | This exception is thrown when the Amazon Cognito service encounters an invalid parameter. |
TooManyRequestsException | This exception is thrown when the user has made too many requests for a given operation. |
UnauthorizedException | Exception that is thrown when the request isn't authorized. This can happen due to an invalid access token in the request. |
UnsupportedOperationException | Exception that is thrown when you attempt to perform an operation that isn't enabled for the user pool client. |
UnsupportedTokenTypeException | Exception that is thrown when an unsupported token is passed to an operation. |
.NET Framework:
Supported in: 4.5 and newer, 3.5