File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -654,9 +654,10 @@ def retrieve(self) -> Credentials:
654
654
if self ._policy :
655
655
query_params ["Policy" ] = self ._policy
656
656
657
+ access_token = jwt .get ("access_token" ) or jwt .get ("id_token" , "" )
657
658
if self ._is_web_identity ():
658
659
query_params ["Action" ] = "AssumeRoleWithWebIdentity"
659
- query_params ["WebIdentityToken" ] = jwt . get ( "id_token" , "" )
660
+ query_params ["WebIdentityToken" ] = access_token
660
661
if self ._role_arn :
661
662
query_params ["RoleArn" ] = self ._role_arn
662
663
query_params ["RoleSessionName" ] = (
@@ -666,7 +667,7 @@ def retrieve(self) -> Credentials:
666
667
)
667
668
else :
668
669
query_params ["Action" ] = "AssumeRoleWithClientGrants"
669
- query_params ["Token" ] = jwt . get ( "id_token" , "" )
670
+ query_params ["Token" ] = access_token
670
671
671
672
url = self ._sts_endpoint + "?" + urlencode (query_params )
672
673
res = _urlopen (self ._http_client , "POST" , url )
You can’t perform that action at this time.
0 commit comments