logout method

Future<void> logout({
  1. required String accessToken,
})

Removes the client- and server-side session that is associated with the user.

May throw InvalidRequestException. May throw UnauthorizedException. May throw TooManyRequestsException.

Parameter accessToken : The token issued by the CreateToken API call. For more information, see CreateToken in the AWS SSO OIDC API Reference Guide.

Implementation

Future<void> logout({
  required String accessToken,
}) async {
  ArgumentError.checkNotNull(accessToken, 'accessToken');
  final headers = <String, String>{
    'x-amz-sso_bearer_token': accessToken.toString(),
  };
  await _protocol.send(
    payload: null,
    method: 'POST',
    requestUri: '/logout',
    signed: false,
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}