@@ -270,6 +270,7 @@ def user_agent(self) -> str:
270
270
class RequestContextV2AuthorizerIam (DictWrapper ):
271
271
@property
272
272
def access_key (self ) -> Optional [str ]:
273
+ """The IAM user access key associated with the request."""
273
274
return self .get ("accessKey" )
274
275
275
276
@property
@@ -284,6 +285,8 @@ def caller_id(self) -> Optional[str]:
284
285
285
286
@property
286
287
def cognito_amr (self ) -> Optional [List [str ]]:
288
+ """This represents how the user was authenticated.
289
+ AMR stands for Authentication Methods References as per the openid spec"""
287
290
return self ["cognitoIdentity" ].get ("amr" )
288
291
289
292
@property
@@ -310,6 +313,7 @@ def user_arn(self) -> Optional[str]:
310
313
311
314
@property
312
315
def user_id (self ) -> Optional [str ]:
316
+ """The IAM user ID of the effective user identified after authentication."""
313
317
return self .get ("userId" )
314
318
315
319
@@ -324,10 +328,12 @@ def jwt_scopes(self) -> List[str]:
324
328
325
329
@property
326
330
def get_lambda (self ) -> Optional [Dict [str , Any ]]:
331
+ """Lambda authorization context details"""
327
332
return self .get ("lambda" )
328
333
329
334
@property
330
335
def iam (self ) -> Optional [RequestContextV2AuthorizerIam ]:
336
+ """IAM authorization details used for making the request."""
331
337
iam = self .get ("iam" )
332
338
return None if iam is None else RequestContextV2AuthorizerIam (iam )
333
339
0 commit comments