cancelParticipantAuthentication method

Future<void> cancelParticipantAuthentication({
  1. required String connectionToken,
  2. required String sessionId,
})

Cancels the authentication session. The opted out branch of the Authenticate Customer flow block will be taken. The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter connectionToken : The authentication token associated with the participant's connection.

Parameter sessionId : The sessionId provided in the authenticationInitiated event.

Implementation

Future<void> cancelParticipantAuthentication({
  required String connectionToken,
  required String sessionId,
}) async {
  final headers = <String, String>{
    'X-Amz-Bearer': connectionToken.toString(),
  };
  final $payload = <String, dynamic>{
    'SessionId': sessionId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/participant/cancel-authentication',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}