-
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
326 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"authorization_endpoint": "https://login.microsoftonline.com/01234567-89ab-cdef-0123-456789abcdef/oauth2/v2.0/authorize", | ||
"token_endpoint": "https://login.microsoftonline.com/01234567-89ab-cdef-0123-456789abcdef/oauth2/v2.0/token", | ||
"token_endpoint_auth_methods_supported": [ | ||
"client_secret_post", | ||
"private_key_jwt", | ||
"client_secret_basic" | ||
], | ||
"jwks_uri": "https://login.microsoftonline.com/common/discovery/keys", | ||
"response_modes_supported": [ | ||
"query", | ||
"fragment", | ||
"form_post" | ||
], | ||
"subject_types_supported": [ | ||
"pairwise" | ||
], | ||
"id_token_signing_alg_values_supported": [ | ||
"RS256" | ||
], | ||
"http_logout_supported": true, | ||
"frontchannel_logout_supported": true, | ||
"end_session_endpoint": "https://login.microsoftonline.com/01234567-89ab-cdef-0123-456789abcdef/oauth2/v2.0/logout", | ||
"response_types_supported": [ | ||
"code", | ||
"id_token", | ||
"code id_token", | ||
"token id_token", | ||
"token" | ||
], | ||
"scopes_supported": [ | ||
"openid" | ||
], | ||
"issuer": "https://sts.windows.net/01234567-89ab-cdef-0123-456789abcdef/", | ||
"claims_supported": [ | ||
"sub", | ||
"iss", | ||
"cloud_instance_name", | ||
"cloud_instance_host_name", | ||
"cloud_graph_host_name", | ||
"msgraph_host", | ||
"aud", | ||
"exp", | ||
"iat", | ||
"auth_time", | ||
"acr", | ||
"amr", | ||
"nonce", | ||
"email", | ||
"given_name", | ||
"family_name", | ||
"nickname" | ||
], | ||
"microsoft_multi_refresh_token": true, | ||
"check_session_iframe": "https://login.microsoftonline.com/01234567-89ab-cdef-0123-456789abcdef/oauth2/v2.0/checksession", | ||
"userinfo_endpoint": "https://login.microsoftonline.com/01234567-89ab-cdef-0123-456789abcdef/openid/userinfo", | ||
"tenant_region_scope": "EU", | ||
"cloud_instance_name": "microsoftonline.com", | ||
"cloud_graph_host_name": "graph.windows.net", | ||
"msgraph_host": "graph.microsoft.com", | ||
"rbac_url": "https://pas.windows.net" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,6 +164,17 @@ def test_group_claim(self): | |
self.assertEqual(user.email, "[email protected]") | ||
self.assertEqual(len(user.groups.all()), 0) | ||
|
||
@mock_adfs("2016") | ||
def test_no_group_claim(self): | ||
backend = AdfsAuthCodeBackend() | ||
with patch("django_auth_adfs.backend.settings.GROUPS_CLAIM", None): | ||
user = backend.authenticate(self.request, authorization_code="dummycode") | ||
self.assertIsInstance(user, User) | ||
self.assertEqual(user.first_name, "John") | ||
self.assertEqual(user.last_name, "Doe") | ||
self.assertEqual(user.email, "[email protected]") | ||
self.assertEqual(len(user.groups.all()), 0) | ||
|
||
@mock_adfs("2016", empty_keys=True) | ||
def test_empty_keys(self): | ||
backend = AdfsAuthCodeBackend() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.