Skip to content

Commit 88c78be

Browse files
authored
Merge pull request #250 from AzureAD/client-capabilities-updates
Changes in client capabilities as per AzCLI feedback
2 parents 53b9995 + ddf8526 commit 88c78be

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

msal/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ def acquire_token_on_behalf_of(self, user_assertion, scopes, claims_challenge=No
10101010
The claims_challenge parameter requests specific claims requested by the resource provider
10111011
in the form of a claims_challenge directive in the www-authenticate header to be
10121012
returned from the UserInfo Endpoint and/or in the ID Token and/or Access Token.
1013-
It is a string of a JSON object which contains lists of claims being requested from these locations..
1013+
It is a string of a JSON object which contains lists of claims being requested from these locations.
10141014
10151015
:return: A dict representing the json response from AAD:
10161016

tests/test_application.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,23 +272,23 @@ def helper(scopes, account, authority, *args, **kwargs):
272272
class TestApplicationForClientCapabilities(unittest.TestCase):
273273

274274
def test_capabilities_and_id_token_claims_merge(self):
275-
client_capabilities = ["llt", "ssm"]
275+
client_capabilities = ["foo", "bar"]
276276
claims_challenge = '''{"id_token": {"auth_time": {"essential": true}}}'''
277277
merged_claims = '''{"id_token": {"auth_time": {"essential": true}},
278-
"access_token": {"xms_cc": {"values": ["llt", "ssm"]}}}'''
278+
"access_token": {"xms_cc": {"values": ["foo", "bar"]}}}'''
279279
# Comparing dictionaries as JSON object order differs based on python version
280280
self.assertEqual(
281281
json.loads(merged_claims),
282282
json.loads(_merge_claims_challenge_and_capabilities(
283283
client_capabilities, claims_challenge)))
284284

285285
def test_capabilities_and_id_token_claims_and_access_token_claims_merge(self):
286-
client_capabilities = ["llt", "ssm"]
286+
client_capabilities = ["foo", "bar"]
287287
claims_challenge = '''{"id_token": {"auth_time": {"essential": true}},
288288
"access_token": {"nbf":{"essential":true, "value":"1563308371"}}}'''
289289
merged_claims = '''{"id_token": {"auth_time": {"essential": true}},
290290
"access_token": {"nbf": {"essential": true, "value": "1563308371"},
291-
"xms_cc": {"values": ["llt", "ssm"]}}}'''
291+
"xms_cc": {"values": ["foo", "bar"]}}}'''
292292
# Comparing dictionaries as JSON object order differs based on python version
293293
self.assertEqual(
294294
json.loads(merged_claims),
@@ -302,8 +302,8 @@ def test_no_capabilities_only_claims_merge(self):
302302
json.loads(_merge_claims_challenge_and_capabilities(None, claims_challenge)))
303303

304304
def test_only_client_capabilities_no_claims_merge(self):
305-
client_capabilities = ["llt", "ssm"]
306-
merged_claims = '''{"access_token": {"xms_cc": {"values": ["llt", "ssm"]}}}'''
305+
client_capabilities = ["foo", "bar"]
306+
merged_claims = '''{"access_token": {"xms_cc": {"values": ["foo", "bar"]}}}'''
307307
self.assertEqual(
308308
json.loads(merged_claims),
309309
json.loads(_merge_claims_challenge_and_capabilities(client_capabilities, None)))

0 commit comments

Comments
 (0)