django-auth-adfs 1.11.1__py3-none-any.whl → 1.11.5__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- 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.1.dist-info → django_auth_adfs-1.11.5.dist-info}/METADATA +11 -4
- {django_auth_adfs-1.11.1.dist-info → django_auth_adfs-1.11.5.dist-info}/RECORD +7 -7
- {django_auth_adfs-1.11.1.dist-info → django_auth_adfs-1.11.5.dist-info}/WHEEL +1 -1
- {django_auth_adfs-1.11.1.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,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: django-auth-adfs
|
3
|
-
Version: 1.11.
|
3
|
+
Version: 1.11.5
|
4
4
|
Summary: A Django authentication backend for Microsoft ADFS and AzureAD
|
5
5
|
Home-page: https://github.com/snok/django-auth-adfs
|
6
6
|
License: BSD
|
@@ -22,7 +22,14 @@ Classifier: License :: Other/Proprietary License
|
|
22
22
|
Classifier: Operating System :: OS Independent
|
23
23
|
Classifier: Programming Language :: Python
|
24
24
|
Classifier: Programming Language :: Python :: 3
|
25
|
+
Classifier: Programming Language :: Python :: 3.7
|
26
|
+
Classifier: Programming Language :: Python :: 3.8
|
27
|
+
Classifier: Programming Language :: Python :: 3.9
|
28
|
+
Classifier: Programming Language :: Python :: 3.10
|
29
|
+
Classifier: Programming Language :: Python :: 3.11
|
30
|
+
Classifier: Programming Language :: Python :: 3
|
25
31
|
Classifier: Programming Language :: Python :: 3.10
|
32
|
+
Classifier: Programming Language :: Python :: 3.11
|
26
33
|
Classifier: Programming Language :: Python :: 3.7
|
27
34
|
Classifier: Programming Language :: Python :: 3.8
|
28
35
|
Classifier: Programming Language :: Python :: 3.9
|
@@ -32,9 +39,9 @@ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
|
|
32
39
|
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
33
40
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
34
41
|
Requires-Dist: PyJWT (>=2.4.0,<3.0.0)
|
35
|
-
Requires-Dist: cryptography (>=1.7,<
|
36
|
-
Requires-Dist: django (>=3,<4);
|
37
|
-
Requires-Dist: django (>=3,<5); python_version >= "3.8"
|
42
|
+
Requires-Dist: cryptography (>=1.7,<40.0)
|
43
|
+
Requires-Dist: django (>=3,<4) ; python_full_version <= "3.7.0"
|
44
|
+
Requires-Dist: django (>=3,<5) ; python_version >= "3.8"
|
38
45
|
Requires-Dist: requests (>=1,<3)
|
39
46
|
Requires-Dist: urllib3 (>=1.26.0,<2.0.0)
|
40
47
|
Project-URL: Documentation, https://django-auth-adfs.readthedocs.io/en/latest
|
@@ -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
|