dj-jwt-auth 1.5.4__tar.gz → 1.5.6__tar.gz

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.
Files changed (28) hide show
  1. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/PKG-INFO +1 -1
  2. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/dj_jwt_auth.egg-info/PKG-INFO +1 -1
  3. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/dj_jwt_auth.egg-info/SOURCES.txt +1 -0
  4. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/django_jwt/settings.py +3 -0
  5. dj-jwt-auth-1.5.6/django_jwt/templates/admin/login.html +9 -0
  6. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/django_jwt/templates/django-jwt-index.html +7 -0
  7. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/django_jwt/views.py +1 -1
  8. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/setup.cfg +1 -1
  9. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/MANIFEST.in +0 -0
  10. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/README.md +0 -0
  11. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/dj_jwt_auth.egg-info/dependency_links.txt +0 -0
  12. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/dj_jwt_auth.egg-info/requires.txt +0 -0
  13. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/dj_jwt_auth.egg-info/top_level.txt +0 -0
  14. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/django_jwt/__init__.py +0 -0
  15. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/django_jwt/config.py +0 -0
  16. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/django_jwt/exceptions.py +0 -0
  17. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/django_jwt/middleware.py +0 -0
  18. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/django_jwt/pkce.py +0 -0
  19. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/django_jwt/roles.py +0 -0
  20. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/django_jwt/urls.py +0 -0
  21. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/django_jwt/user.py +0 -0
  22. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/django_jwt/utils.py +0 -0
  23. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/pyproject.toml +0 -0
  24. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/setup.py +0 -0
  25. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/tests/__init__.py +0 -0
  26. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/tests/models.py +0 -0
  27. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/tests/test.py +0 -0
  28. {dj-jwt-auth-1.5.4 → dj-jwt-auth-1.5.6}/tests/urls.py +0 -0
@@ -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.6
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
@@ -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.6
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
@@ -20,6 +20,7 @@ django_jwt/user.py
20
20
  django_jwt/utils.py
21
21
  django_jwt/views.py
22
22
  django_jwt/templates/django-jwt-index.html
23
+ django_jwt/templates/admin/login.html
23
24
  tests/__init__.py
24
25
  tests/models.py
25
26
  tests/test.py
@@ -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)
@@ -0,0 +1,9 @@
1
+ {% extends "admin/login.html" %}
2
+
3
+ {% block content %}
4
+ {{ block.super }}
5
+ <br>
6
+ <div style="text-align: center;">
7
+ <a class="button" style="display: inline-block; margin-top: 20px" href="{% url 'start_oidc_auth' %}">NeoID Login</a>
8
+ </div>
9
+ {% endblock %}
@@ -40,6 +40,13 @@
40
40
  <div class="error-message">
41
41
  {{ error_message }}
42
42
  </div>
43
+
44
+ <hgroup>
45
+ <h3>How to receive access</h3>
46
+ <a href="https://elsevier.atlassian.net/wiki/spaces/HM3D4MED/pages/119483629076583/Admin+panels+access"
47
+ target="_blank" rel="noopener noreferrer"
48
+ >Confluence page</a>
49
+ </hgroup>
43
50
  </div>
44
51
  </body>
45
52
  </html>
@@ -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")
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = dj-jwt-auth
3
- version = 1.5.4
3
+ version = 1.5.6
4
4
  description = A Django package for JSON Web Token validation and verification. Using PyJWT.
5
5
  long_description = file: README.md
6
6
  url = https://www.example.com/
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes