dj-jwt-auth 1.5.4__py3-none-any.whl → 1.5.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dj-jwt-auth
3
- Version: 1.5.4
3
+ Version: 1.5.5
4
4
  Summary: A Django package for JSON Web Token validation and verification. Using PyJWT.
5
5
  Home-page: https://www.example.com/
6
6
  Author: Konstantin Seleznev
@@ -4,17 +4,17 @@ django_jwt/exceptions.py,sha256=vFJcGOCSZvxJRbSeMgWgPUM9wcXu6CSHblpwMzhV-Ic,198
4
4
  django_jwt/middleware.py,sha256=4PiF0-v13aLjvTyeyumQqYFimb6gCDHBgm6KooPGZdM,1176
5
5
  django_jwt/pkce.py,sha256=HYIQI0vKSmQkYIqTj3cciIT01ldkjhqlYiXkYcnNSGc,711
6
6
  django_jwt/roles.py,sha256=SaHK3o8T8USS4ZhG4SrHPlZQV2lMb2t1UZHT6IQtBvA,143
7
- django_jwt/settings.py,sha256=gJePa3ER0vY6k5sDk-L1VagjbF4_dYrP0zrRJkGNY6Y,1708
7
+ django_jwt/settings.py,sha256=4mc8daSDKs3uYlRJBuS4CP7_CtKD3VrLWvaBjJ6yJV8,1837
8
8
  django_jwt/urls.py,sha256=ZhcnRcQ1MBRh-bS7fTa-Vkz8yuWUhv-G_uRXKLnKAs0,320
9
9
  django_jwt/user.py,sha256=lQ7AIdI4J-d2e1oCQIIyQKnXtjqCYD14e4WOhF2LbYs,5292
10
10
  django_jwt/utils.py,sha256=Gz8cH0cD3y_cvW8FwRoCFgShBrYvcB7XBF0GWx0n2qQ,1485
11
- django_jwt/views.py,sha256=LweS9G_NBeiuVDLhtm_GtOi_Ok6Sz5KJVTU62k91Jcg,4352
11
+ django_jwt/views.py,sha256=MDuMPzmEAjWR6lB8ZyiozAJYH49MaiYeztE1we_u-9M,4352
12
12
  django_jwt/templates/django-jwt-index.html,sha256=8ud1y8gBeUlAFO4qcSjvmGm_TrexR9z8AoGUQJgfHE4,1089
13
13
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  tests/models.py,sha256=4uonwXuAvJGlITpuxFazyoeA_CSUYMyN7Vj1gEWJTH4,308
15
15
  tests/test.py,sha256=nD1sm_nH0l9ADnwavySPdhgrNOvLX7nLYol7w306TFU,9720
16
16
  tests/urls.py,sha256=D5FhDSVAudurkrpkCZZPnDvgXSgifwFVB3nAlYBg7uQ,212
17
- dj_jwt_auth-1.5.4.dist-info/METADATA,sha256=VtJfpoaWWgp7k9lRxhzPOMy5NhOq2jzN5vXKl5skJkA,4369
18
- dj_jwt_auth-1.5.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
19
- dj_jwt_auth-1.5.4.dist-info/top_level.txt,sha256=58O7TdK-yECZcbmPc52KNlBFpjIUlENuZubCxaSOxus,17
20
- dj_jwt_auth-1.5.4.dist-info/RECORD,,
17
+ dj_jwt_auth-1.5.5.dist-info/METADATA,sha256=2UxQjs83DaLb5BL6b1j4oSDdNxCXVDbyX9khMylgAPY,4369
18
+ dj_jwt_auth-1.5.5.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
19
+ dj_jwt_auth-1.5.5.dist-info/top_level.txt,sha256=58O7TdK-yECZcbmPc52KNlBFpjIUlENuZubCxaSOxus,17
20
+ dj_jwt_auth-1.5.5.dist-info/RECORD,,
django_jwt/settings.py CHANGED
@@ -42,6 +42,9 @@ OIDC_ADMIN_ISSUER = getattr(settings, "OIDC_ADMIN_ISSUER", None)
42
42
  OIDC_ADMIN_CLIENT_ID = getattr(settings, "OIDC_ADMIN_CLIENT_ID", "cs-completeanatomy-admin")
43
43
  OIDC_ADMIN_SCOPE = getattr(settings, "OIDC_ADMIN_SCOPE", "openid")
44
44
  OIDC_ADMIN_ROLES = getattr(settings, "OIDC_ADMIN_ROLES", [])
45
+ OIDC_AUTHORIZATION_BACKEND = getattr(
46
+ settings, "OIDC_AUTHORIZATION_BACKEND", "django.contrib.auth.backends.ModelBackend",
47
+ )
45
48
 
46
49
  if not OIDC_ADMIN_ISSUER:
47
50
  OIDC_ADMIN_ISSUER = OIDC_CONFIG_ROUTES.get("ES256", None)
django_jwt/views.py CHANGED
@@ -99,7 +99,7 @@ class ReceiveRedirectView(AbsView):
99
99
  roles = role_handler.apply(user, data)
100
100
  if not user.is_staff:
101
101
  raise BadRequestException(f"User {user.email} is not staff\nRoles: {roles}")
102
- login(request, user, backend=settings.DEFAULT_AUTHENTICATION_BACKEND)
102
+ login(request, user, backend=jwt_settings.OIDC_AUTHORIZATION_BACKEND)
103
103
  return redirect("admin:index")
104
104
 
105
105
  raise BadRequestException("No PKCE secret found in cache")