getSigningCertificate method
This method takes a user pool ID, and returns the signing certificate.
May throw InternalErrorException. May throw InvalidParameterException. May throw ResourceNotFoundException.
Parameter userPoolId
:
The user pool ID.
Implementation
Future<GetSigningCertificateResponse> getSigningCertificate({
required String userPoolId,
}) async {
ArgumentError.checkNotNull(userPoolId, 'userPoolId');
_s.validateStringLength(
'userPoolId',
userPoolId,
1,
55,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSCognitoIdentityProviderService.GetSigningCertificate'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'UserPoolId': userPoolId,
},
);
return GetSigningCertificateResponse.fromJson(jsonResponse.body);
}