dj-jwt-auth 1.3.0__tar.gz → 1.3.1__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 (25) hide show
  1. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/PKG-INFO +4 -2
  2. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/README.md +3 -1
  3. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/dj_jwt_auth.egg-info/PKG-INFO +4 -2
  4. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/dj_jwt_auth.egg-info/SOURCES.txt +1 -0
  5. dj-jwt-auth-1.3.1/django_jwt/roles.py +3 -0
  6. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/django_jwt/settings.py +1 -2
  7. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/django_jwt/user.py +0 -2
  8. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/setup.cfg +1 -1
  9. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/tests/test.py +2 -1
  10. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/dj_jwt_auth.egg-info/dependency_links.txt +0 -0
  11. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/dj_jwt_auth.egg-info/requires.txt +0 -0
  12. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/dj_jwt_auth.egg-info/top_level.txt +0 -0
  13. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/django_jwt/__init__.py +0 -0
  14. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/django_jwt/config.py +0 -0
  15. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/django_jwt/exceptions.py +0 -0
  16. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/django_jwt/middleware.py +0 -0
  17. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/django_jwt/pkce.py +0 -0
  18. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/django_jwt/urls.py +0 -0
  19. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/django_jwt/utils.py +0 -0
  20. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/django_jwt/views.py +0 -0
  21. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/pyproject.toml +0 -0
  22. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/setup.py +0 -0
  23. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/tests/__init__.py +0 -0
  24. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/tests/models.py +0 -0
  25. {dj-jwt-auth-1.3.0 → dj-jwt-auth-1.3.1}/tests/urls.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dj-jwt-auth
3
- Version: 1.3.0
3
+ Version: 1.3.1
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
@@ -95,8 +95,10 @@ To integrate admin panel with OIDC, add OIDC_ADMIN_ISSUER and OIDC_ADMIN_CLIENT_
95
95
  ```
96
96
  - OIDC_ADMIN_CLIENT_ID - by default "complete-anatomy"
97
97
  To mapping roles to admin panel permissions, use OIDC_ADMIN_ROLES. Example:
98
+
98
99
  ```python
99
- from django_jwt.user import ROLE
100
+
101
+ from django_jwt.roles import ROLE
100
102
 
101
103
  OIDC_ADMIN_ROLES = [
102
104
  ROLE(
@@ -71,8 +71,10 @@ To integrate admin panel with OIDC, add OIDC_ADMIN_ISSUER and OIDC_ADMIN_CLIENT_
71
71
  ```
72
72
  - OIDC_ADMIN_CLIENT_ID - by default "complete-anatomy"
73
73
  To mapping roles to admin panel permissions, use OIDC_ADMIN_ROLES. Example:
74
+
74
75
  ```python
75
- from django_jwt.user import ROLE
76
+
77
+ from django_jwt.roles import ROLE
76
78
 
77
79
  OIDC_ADMIN_ROLES = [
78
80
  ROLE(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dj-jwt-auth
3
- Version: 1.3.0
3
+ Version: 1.3.1
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
@@ -95,8 +95,10 @@ To integrate admin panel with OIDC, add OIDC_ADMIN_ISSUER and OIDC_ADMIN_CLIENT_
95
95
  ```
96
96
  - OIDC_ADMIN_CLIENT_ID - by default "complete-anatomy"
97
97
  To mapping roles to admin panel permissions, use OIDC_ADMIN_ROLES. Example:
98
+
98
99
  ```python
99
- from django_jwt.user import ROLE
100
+
101
+ from django_jwt.roles import ROLE
100
102
 
101
103
  OIDC_ADMIN_ROLES = [
102
104
  ROLE(
@@ -12,6 +12,7 @@ django_jwt/config.py
12
12
  django_jwt/exceptions.py
13
13
  django_jwt/middleware.py
14
14
  django_jwt/pkce.py
15
+ django_jwt/roles.py
15
16
  django_jwt/settings.py
16
17
  django_jwt/urls.py
17
18
  django_jwt/user.py
@@ -0,0 +1,3 @@
1
+ from collections import namedtuple
2
+
3
+ ROLE = namedtuple("Role", ["name", "is_superuser", "groups", "permissions"], defaults=["", False, [], []])
@@ -1,4 +1,5 @@
1
1
  from django.conf import settings
2
+ from django_jwt.roles import ROLE
2
3
 
3
4
  OIDC_AUDIENCE = getattr(settings, "OIDC_AUDIENCE", ["account", "broker"])
4
5
  OIDC_CONFIG_URL = getattr(settings, "OIDC_CONFIG_URL", None)
@@ -42,6 +43,4 @@ OIDC_ADMIN_SCOPE = getattr(settings, "OIDC_ADMIN_SCOPE", "openid")
42
43
  OIDC_ADMIN_ROLES = getattr(settings, "OIDC_ADMIN_ROLES", [])
43
44
 
44
45
  for role in OIDC_ADMIN_ROLES:
45
- from django_jwt.user import ROLE
46
-
47
46
  assert isinstance(role, ROLE), f"Role must be a namedtuple, got {type(role)}"
@@ -1,4 +1,3 @@
1
- from collections import namedtuple
2
1
  from datetime import datetime
3
2
  from functools import cache
4
3
  from logging import getLogger
@@ -15,7 +14,6 @@ utc = pytz.UTC
15
14
  log = getLogger(__name__)
16
15
 
17
16
  model = get_user_model()
18
- ROLE = namedtuple("Role", ["name", "is_superuser", "groups", "permissions"], defaults=["", False, [], []])
19
17
 
20
18
 
21
19
  class UserHandler:
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = dj-jwt-auth
3
- version = 1.3.0
3
+ version = 1.3.1
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/
@@ -9,7 +9,8 @@ from jwt.api_jwt import ExpiredSignatureError
9
9
 
10
10
  from django_jwt import settings
11
11
  from django_jwt.middleware import JWTAuthMiddleware
12
- from django_jwt.user import ROLE, role_handler
12
+ from django_jwt.user import role_handler
13
+ from django_jwt.roles import ROLE
13
14
 
14
15
  access_token_payload = {
15
16
  "sub": "12345",
File without changes
File without changes
File without changes
File without changes