getUserPoolMfaConfig method
Given a user pool ID, returns configuration for sign-in with WebAuthn authenticators and for multi-factor authentication (MFA). This operation describes the following:
- The WebAuthn relying party (RP) ID and user-verification settings.
- The required, optional, or disabled state of MFA for all user pool users.
- The message templates for email and SMS MFA.
- The enabled or disabled state of time-based one-time password (TOTP) MFA.
May throw InternalErrorException.
May throw InvalidParameterException.
May throw NotAuthorizedException.
May throw ResourceNotFoundException.
May throw TooManyRequestsException.
Parameter userPoolId :
The ID of the user pool where you want to query WebAuthn and MFA
configuration.
Implementation
Future<GetUserPoolMfaConfigResponse> getUserPoolMfaConfig({
required String userPoolId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSCognitoIdentityProviderService.GetUserPoolMfaConfig'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'UserPoolId': userPoolId,
},
);
return GetUserPoolMfaConfigResponse.fromJson(jsonResponse.body);
}