dj-jwt-auth 1.5.13__tar.gz → 1.6.0__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.
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/PKG-INFO +1 -1
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/dj_jwt_auth.egg-info/PKG-INFO +1 -1
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/django_jwt/user.py +4 -4
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/setup.cfg +1 -1
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/tests/test.py +2 -2
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/MANIFEST.in +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/README.md +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/dj_jwt_auth.egg-info/SOURCES.txt +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/dj_jwt_auth.egg-info/dependency_links.txt +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/dj_jwt_auth.egg-info/requires.txt +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/dj_jwt_auth.egg-info/top_level.txt +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/django_jwt/__init__.py +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/django_jwt/config.py +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/django_jwt/exceptions.py +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/django_jwt/middleware.py +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/django_jwt/pkce.py +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/django_jwt/roles.py +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/django_jwt/settings.py +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/django_jwt/templates/admin/login.html +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/django_jwt/templates/django-jwt-index.html +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/django_jwt/urls.py +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/django_jwt/utils.py +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/django_jwt/views.py +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/pyproject.toml +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/setup.py +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/tests/__init__.py +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/tests/models.py +0 -0
- {dj-jwt-auth-1.5.13 → dj-jwt-auth-1.6.0}/tests/urls.py +0 -0
|
@@ -26,7 +26,7 @@ class UserHandler:
|
|
|
26
26
|
modified_at = None
|
|
27
27
|
|
|
28
28
|
def __init__(self, payload: dict, request: HttpRequest, access_token: str):
|
|
29
|
-
|
|
29
|
+
self.payload = payload
|
|
30
30
|
self.kwargs = settings.OIDC_USER_DEFAULTS.copy()
|
|
31
31
|
self.kwargs[settings.OIDC_USER_UID] = payload[settings.OIDC_TOKEN_USER_UID]
|
|
32
32
|
|
|
@@ -63,7 +63,7 @@ class UserHandler:
|
|
|
63
63
|
|
|
64
64
|
user = model.objects.create(**self.kwargs)
|
|
65
65
|
if self.on_create:
|
|
66
|
-
self.on_create(user, self.request)
|
|
66
|
+
self.on_create(user, self.request, self.payload)
|
|
67
67
|
return user
|
|
68
68
|
|
|
69
69
|
def _get_by_email(self) -> model:
|
|
@@ -72,7 +72,7 @@ class UserHandler:
|
|
|
72
72
|
user = model.objects.get(email=self.kwargs["email"])
|
|
73
73
|
self._update_user(user)
|
|
74
74
|
if self.on_update:
|
|
75
|
-
self.on_update(user, self.request)
|
|
75
|
+
self.on_update(user, self.request, self.payload)
|
|
76
76
|
return user
|
|
77
77
|
|
|
78
78
|
def _update_existing_user(self, user):
|
|
@@ -93,7 +93,7 @@ class UserHandler:
|
|
|
93
93
|
if self.modified_at and is_modified:
|
|
94
94
|
self._update_user(user)
|
|
95
95
|
if self.on_update:
|
|
96
|
-
self.on_update(user, self.request)
|
|
96
|
+
self.on_update(user, self.request, self.payload)
|
|
97
97
|
|
|
98
98
|
def get_user(self) -> model:
|
|
99
99
|
"""
|
|
@@ -29,12 +29,12 @@ user_info_payload = {
|
|
|
29
29
|
User = get_user_model()
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
def _on_create(user, request):
|
|
32
|
+
def _on_create(user, request, token_data):
|
|
33
33
|
user.username = "on_create"
|
|
34
34
|
user.save()
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
def _on_update(user, request):
|
|
37
|
+
def _on_update(user, request, token_data):
|
|
38
38
|
user.username = "on_update"
|
|
39
39
|
user.save()
|
|
40
40
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|