We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48faeb7 commit 7bc92d3Copy full SHA for 7bc92d3
msal/application.py
@@ -4,7 +4,7 @@
4
except: # Python 3
5
from urllib.parse import urljoin
6
import logging
7
-from base64 import b64encode
+from base64 import urlsafe_b64encode
8
import sys
9
10
from .oauth2cli import Client, JwtSigner
@@ -405,7 +405,7 @@ def _acquire_token_by_username_password_federated(
405
raise RuntimeError(
406
"RSTR returned unknown token type: %s", wstrust_result.get("type"))
407
return self.client.obtain_token_by_assertion(
408
- b64encode(wstrust_result["token"]),
+ urlsafe_b64encode(wstrust_result["token"]).strip(b'='),
409
grant_type=grant_type, scope=scopes, **kwargs)
410
411
0 commit comments