-
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #247 from 777GE90/add_obo_groups_lookup
Added ability to obtain groups from MS Graph when there are too many
- Loading branch information
Showing
10 changed files
with
503 additions
and
33 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 |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
Adding imports here will break setup.py | ||
""" | ||
|
||
__version__ = '1.10.0' | ||
__version__ = '1.10.1' |
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = 'django-auth-adfs' | ||
version = "1.10.0" # Remember to also change __init__.py version | ||
version = "1.10.1" # Remember to also change __init__.py version | ||
description = 'A Django authentication backend for Microsoft ADFS and AzureAD' | ||
authors = ['Joris Beckers <[email protected]>'] | ||
maintainers = ['Jonas Krüger Svensson <[email protected]>', 'Sondre Lillebø Gundersen <[email protected]>'] | ||
|
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() | ||
|
Oops, something went wrong.