revokeToken method

Future<void> revokeToken(
  1. String account,
  2. String token
)

Revoke a token

Permanently revokes a token. It cannot be undone. This action also immediately invalidates all sessions using the given token.

Parameters:

  • String account (required): The identifier (UUID) or slug of your Keygen account.

  • String token (required): The identifier (UUID) of the token to be revoked.

Implementation

Future<void> revokeToken(String account, String token,) async {
  final response = await revokeTokenWithHttpInfo(account, token,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
}