Skip to content

Commit 1b7c873

Browse files
Update aws_lambda_powertools/utilities/data_classes/cognito_user_pool_event.py
Co-authored-by: Leandro Damascena <[email protected]> Signed-off-by: Stéphane MENG <[email protected]>
1 parent 695074b commit 1b7c873

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aws_lambda_powertools/utilities/data_classes/cognito_user_pool_event.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1065,15 +1065,15 @@ def user_attributes(self) -> Dict[str, str]:
10651065
return self["request"]["userAttributes"]
10661066

10671067
@property
1068-
def client_metadata(self) -> Optional[Dict[str, str]]:
1068+
def client_metadata(self) -> Dict[str, str]:
10691069
"""One or more key-value pairs that you can provide as custom input to the
10701070
custom SMS sender Lambda function trigger. To pass this data to your Lambda function,
10711071
you can use the ClientMetadata parameter in the AdminRespondToAuthChallenge and
10721072
RespondToAuthChallenge API actions. Amazon Cognito doesn't include data from the
10731073
ClientMetadata parameter in AdminInitiateAuth and InitiateAuth API operations
10741074
in the request that it passes to the post authentication function.
10751075
"""
1076-
return self["request"].get("clientMetadata")
1076+
return self["request"].get("clientMetadata") or {}
10771077

10781078

10791079
class CustomSMSSenderTriggerEvent(BaseTriggerEvent):

0 commit comments

Comments
 (0)