File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 44except : # Python 3
55 from urllib .parse import urljoin
66import logging
7- from base64 import urlsafe_b64encode
87import sys
98
109from .oauth2cli import Client , JwtSigner
@@ -404,9 +403,10 @@ def _acquire_token_by_username_password_federated(
404403 if not grant_type :
405404 raise RuntimeError (
406405 "RSTR returned unknown token type: %s" , wstrust_result .get ("type" ))
406+ self .client .grant_assertion_encoders .setdefault ( # Register a non-standard type
407+ grant_type , self .client .encode_saml_assertion )
407408 return self .client .obtain_token_by_assertion (
408- urlsafe_b64encode (wstrust_result ["token" ]).strip (b'=' ),
409- grant_type = grant_type , scope = scopes , ** kwargs )
409+ wstrust_result ["token" ], grant_type , scope = scopes , ** kwargs )
410410
411411
412412class ConfidentialClientApplication (ClientApplication ): # server-side web app
You can’t perform that action at this time.
0 commit comments