django-auth-adfs 1.11.4__py3-none-any.whl → 1.11.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- django_auth_adfs/__init__.py +1 -1
- django_auth_adfs/config.py +9 -1
- django_auth_adfs/drf_urls.py +1 -0
- {django_auth_adfs-1.11.4.dist-info → django_auth_adfs-1.11.5.dist-info}/METADATA +1 -1
- {django_auth_adfs-1.11.4.dist-info → django_auth_adfs-1.11.5.dist-info}/RECORD +7 -7
- {django_auth_adfs-1.11.4.dist-info → django_auth_adfs-1.11.5.dist-info}/WHEEL +1 -1
- {django_auth_adfs-1.11.4.dist-info → django_auth_adfs-1.11.5.dist-info}/LICENSE +0 -0
django_auth_adfs/__init__.py
CHANGED
django_auth_adfs/config.py
CHANGED
@@ -78,6 +78,7 @@ class Settings(object):
|
|
78
78
|
self.PROXIES = None
|
79
79
|
|
80
80
|
self.VERSION = 'v1.0'
|
81
|
+
self.SCOPES = []
|
81
82
|
|
82
83
|
required_settings = [
|
83
84
|
"AUDIENCE",
|
@@ -138,6 +139,10 @@ class Settings(object):
|
|
138
139
|
elif "VERSION" in _settings:
|
139
140
|
raise ImproperlyConfigured("The VERSION cannot be set when TENANT_ID is not set.")
|
140
141
|
|
142
|
+
if self.VERSION == "v2.0" and not self.SCOPES and self.RELYING_PARTY_ID:
|
143
|
+
warnings.warn('Use `SCOPES` for AzureAD instead of RELYING_PARTY_ID', DeprecationWarning)
|
144
|
+
if not isinstance(self.SCOPES, list):
|
145
|
+
raise ImproperlyConfigured("Scopes must be a list")
|
141
146
|
# Overwrite defaults with user settings
|
142
147
|
for setting, value in _settings.items():
|
143
148
|
if hasattr(self, setting):
|
@@ -346,7 +351,10 @@ class ProviderConfig(object):
|
|
346
351
|
})
|
347
352
|
if self._mode == "openid_connect":
|
348
353
|
if settings.VERSION == 'v2.0':
|
349
|
-
|
354
|
+
if settings.SCOPES:
|
355
|
+
query['scope'] = " ".join(settings.SCOPES)
|
356
|
+
else:
|
357
|
+
query["scope"] = f"openid api://{settings.RELYING_PARTY_ID}/.default"
|
350
358
|
query.pop("resource")
|
351
359
|
else:
|
352
360
|
query["scope"] = "openid"
|
django_auth_adfs/drf_urls.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
django_auth_adfs/__init__.py,sha256=
|
1
|
+
django_auth_adfs/__init__.py,sha256=vvinReQ530z7PGktsPFHHJ9Uup-RPzrI9rMkeD_oFeQ,137
|
2
2
|
django_auth_adfs/backend.py,sha256=UxKnlMrQ3IMOnIiBd3itYtFOer-QxLTSHXXt5deew-s,18055
|
3
|
-
django_auth_adfs/config.py,sha256=
|
3
|
+
django_auth_adfs/config.py,sha256=p9uNhl4C6OIuiUHAdYmW6LiqhvoI_ZnR_W-mh-u3Z6w,16251
|
4
4
|
django_auth_adfs/drf-urls.py,sha256=bBnN1WrgbHoiAs5hTGe-ovmVwwJ4D2xXpYtZVfE8l5U,221
|
5
|
-
django_auth_adfs/drf_urls.py,sha256=
|
5
|
+
django_auth_adfs/drf_urls.py,sha256=YKH7he1cCDr_eo0kgPJQiJ3kmo1FBS46JzSiBOOqwE0,430
|
6
6
|
django_auth_adfs/exceptions.py,sha256=yxwKHtDSMnskgBdIQoCWerYVr8sGtIn26GWVVdhA2YU,110
|
7
7
|
django_auth_adfs/middleware.py,sha256=st8Hx5pHWNcYUNWrCQht3QJqjw6RLQhWyxneTWal0Nw,2249
|
8
8
|
django_auth_adfs/rest_framework.py,sha256=spWIXpb8UtVDvZ0_W_sJB-5u0hwvLNUCqbAhHf9N0W4,1656
|
@@ -10,7 +10,7 @@ django_auth_adfs/signals.py,sha256=HGD79-dZNEwqVuINoqe6jB_8K1RfuK5Q288RGamTtEU,1
|
|
10
10
|
django_auth_adfs/templates/django_auth_adfs/login_failed.html,sha256=1NQ5aCjo7iTLSxy2IXJZbzBp5MaxpfsfQwQ_PDFvgr4,652
|
11
11
|
django_auth_adfs/urls.py,sha256=4Cec5XbxrAqPHc_N3yMTC_m9UKZXsZktf3rO2niF4Bw,533
|
12
12
|
django_auth_adfs/views.py,sha256=kwMqcsDAgcuQRBgxpRVnFZY79ZkVo28LB3KOIbayI3E,4100
|
13
|
-
django_auth_adfs-1.11.
|
14
|
-
django_auth_adfs-1.11.
|
15
|
-
django_auth_adfs-1.11.
|
16
|
-
django_auth_adfs-1.11.
|
13
|
+
django_auth_adfs-1.11.5.dist-info/LICENSE,sha256=n3ImkhGUnnJEu1sT51QKc_N22WdixSRcrfg9gj6nr3c,1296
|
14
|
+
django_auth_adfs-1.11.5.dist-info/METADATA,sha256=L2CsKBB8f2QYng6FvTiKDVrwIOYwT5Je1s4cOcv3baw,6305
|
15
|
+
django_auth_adfs-1.11.5.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
16
|
+
django_auth_adfs-1.11.5.dist-info/RECORD,,
|
File without changes
|