@@ -188,6 +188,7 @@ class ClientApplication(object):
188
188
"You can enable broker by following these instructions. "
189
189
"https://msal-python.readthedocs.io/en/latest/#publicclientapplication" )
190
190
191
+
191
192
def __init__ (
192
193
self , client_id ,
193
194
client_credential = None , authority = None , validate_authority = True ,
@@ -1712,11 +1713,10 @@ def _acquire_token_by_username_password_federated(
1712
1713
wstrust_endpoint .get ("action" ), self .http_client )
1713
1714
if not ("token" in wstrust_result and "type" in wstrust_result ):
1714
1715
raise RuntimeError ("Unsuccessful RSTR. %s" % wstrust_result )
1715
- GRANT_TYPE_SAML1_1 = 'urn:ietf:params:oauth:grant-type:saml1_1-bearer'
1716
1716
grant_type = {
1717
- SAML_TOKEN_TYPE_V1 : GRANT_TYPE_SAML1_1 ,
1717
+ SAML_TOKEN_TYPE_V1 : self . client . GRANT_TYPE_SAML1_1 ,
1718
1718
SAML_TOKEN_TYPE_V2 : self .client .GRANT_TYPE_SAML2 ,
1719
- WSS_SAML_TOKEN_PROFILE_V1_1 : GRANT_TYPE_SAML1_1 ,
1719
+ WSS_SAML_TOKEN_PROFILE_V1_1 : self . client . GRANT_TYPE_SAML1_1 ,
1720
1720
WSS_SAML_TOKEN_PROFILE_V2 : self .client .GRANT_TYPE_SAML2
1721
1721
}.get (wstrust_result .get ("type" ))
1722
1722
if not grant_type :
@@ -2167,11 +2167,10 @@ def _acquire_token_by_iwa_federated(
2167
2167
wstrust_endpoint .get ("action" ), self .http_client )
2168
2168
if not ("token" in wstrust_result and "type" in wstrust_result ):
2169
2169
raise RuntimeError ("Unsuccessful RSTR. %s" % wstrust_result )
2170
- GRANT_TYPE_SAML1_1 = 'urn:ietf:params:oauth:grant-type:saml1_1-bearer'
2171
2170
grant_type = {
2172
- SAML_TOKEN_TYPE_V1 : GRANT_TYPE_SAML1_1 ,
2171
+ SAML_TOKEN_TYPE_V1 : self . client . GRANT_TYPE_SAML1_1 ,
2173
2172
SAML_TOKEN_TYPE_V2 : self .client .GRANT_TYPE_SAML2 ,
2174
- WSS_SAML_TOKEN_PROFILE_V1_1 : GRANT_TYPE_SAML1_1 ,
2173
+ WSS_SAML_TOKEN_PROFILE_V1_1 : self . client . GRANT_TYPE_SAML1_1 ,
2175
2174
WSS_SAML_TOKEN_PROFILE_V2 : self .client .GRANT_TYPE_SAML2
2176
2175
}.get (wstrust_result .get ("type" ))
2177
2176
if not grant_type :
@@ -2185,6 +2184,7 @@ def _acquire_token_by_iwa_federated(
2185
2184
event ,
2186
2185
environment = self .authority .instance ,
2187
2186
username = username , # Useful in case IDT contains no such info
2187
+ iwa = True
2188
2188
)),
2189
2189
** kwargs )
2190
2190
0 commit comments