@@ -239,6 +239,7 @@ class ClientApplication(object):
239
239
"You can enable broker by following these instructions. "
240
240
"https://msal-python.readthedocs.io/en/latest/#publicclientapplication" )
241
241
242
+
242
243
def __init__ (
243
244
self , client_id ,
244
245
client_credential = None , authority = None , validate_authority = True ,
@@ -1889,11 +1890,10 @@ def _acquire_token_by_username_password_federated(
1889
1890
wstrust_endpoint .get ("action" ), self .http_client )
1890
1891
if not ("token" in wstrust_result and "type" in wstrust_result ):
1891
1892
raise RuntimeError ("Unsuccessful RSTR. %s" % wstrust_result )
1892
- GRANT_TYPE_SAML1_1 = 'urn:ietf:params:oauth:grant-type:saml1_1-bearer'
1893
1893
grant_type = {
1894
- SAML_TOKEN_TYPE_V1 : GRANT_TYPE_SAML1_1 ,
1894
+ SAML_TOKEN_TYPE_V1 : self . client . GRANT_TYPE_SAML1_1 ,
1895
1895
SAML_TOKEN_TYPE_V2 : self .client .GRANT_TYPE_SAML2 ,
1896
- WSS_SAML_TOKEN_PROFILE_V1_1 : GRANT_TYPE_SAML1_1 ,
1896
+ WSS_SAML_TOKEN_PROFILE_V1_1 : self . client . GRANT_TYPE_SAML1_1 ,
1897
1897
WSS_SAML_TOKEN_PROFILE_V2 : self .client .GRANT_TYPE_SAML2
1898
1898
}.get (wstrust_result .get ("type" ))
1899
1899
if not grant_type :
@@ -2387,11 +2387,10 @@ def _acquire_token_by_iwa_federated(
2387
2387
wstrust_endpoint .get ("action" ), self .http_client )
2388
2388
if not ("token" in wstrust_result and "type" in wstrust_result ):
2389
2389
raise RuntimeError ("Unsuccessful RSTR. %s" % wstrust_result )
2390
- GRANT_TYPE_SAML1_1 = 'urn:ietf:params:oauth:grant-type:saml1_1-bearer'
2391
2390
grant_type = {
2392
- SAML_TOKEN_TYPE_V1 : GRANT_TYPE_SAML1_1 ,
2391
+ SAML_TOKEN_TYPE_V1 : self . client . GRANT_TYPE_SAML1_1 ,
2393
2392
SAML_TOKEN_TYPE_V2 : self .client .GRANT_TYPE_SAML2 ,
2394
- WSS_SAML_TOKEN_PROFILE_V1_1 : GRANT_TYPE_SAML1_1 ,
2393
+ WSS_SAML_TOKEN_PROFILE_V1_1 : self . client . GRANT_TYPE_SAML1_1 ,
2395
2394
WSS_SAML_TOKEN_PROFILE_V2 : self .client .GRANT_TYPE_SAML2
2396
2395
}.get (wstrust_result .get ("type" ))
2397
2396
if not grant_type :
@@ -2405,6 +2404,7 @@ def _acquire_token_by_iwa_federated(
2405
2404
event ,
2406
2405
environment = self .authority .instance ,
2407
2406
username = username , # Useful in case IDT contains no such info
2407
+ iwa = True
2408
2408
)),
2409
2409
** kwargs )
2410
2410
0 commit comments