dj-jwt-auth 1.5.7__py3-none-any.whl → 1.5.9__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.7
3
+ Version: 1.5.9
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
@@ -6,7 +6,7 @@ django_jwt/pkce.py,sha256=j-v2ffCw0X3JW7ak8vfNeSZI-dACOvHbi1eLmJ0R8gM,685
6
6
  django_jwt/roles.py,sha256=SaHK3o8T8USS4ZhG4SrHPlZQV2lMb2t1UZHT6IQtBvA,143
7
7
  django_jwt/settings.py,sha256=pXQ8WUU4LGBe6PQxCLTLM_2_b1CCSgehqim3yJDqZdw,1922
8
8
  django_jwt/urls.py,sha256=ZhcnRcQ1MBRh-bS7fTa-Vkz8yuWUhv-G_uRXKLnKAs0,320
9
- django_jwt/user.py,sha256=lQ7AIdI4J-d2e1oCQIIyQKnXtjqCYD14e4WOhF2LbYs,5292
9
+ django_jwt/user.py,sha256=uQyXDNMhD67__O08qD9zZUPdhQNkrslHtEec8OBjoBY,5563
10
10
  django_jwt/utils.py,sha256=uIFw1JMldE_blC7YkaZbY7rpcawP2E6zsdLyuZRwJoA,1645
11
11
  django_jwt/views.py,sha256=jQW3YrW-Oed54KqxjDMaBOQ-dxEnqTAcBEXlQSK-zCE,4231
12
12
  django_jwt/templates/django-jwt-index.html,sha256=y8f0v2WbRAFxnIU799I_MZCVsjn1sbdh7bypjdWB0lA,1353
@@ -15,7 +15,7 @@ tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  tests/models.py,sha256=4uonwXuAvJGlITpuxFazyoeA_CSUYMyN7Vj1gEWJTH4,308
16
16
  tests/test.py,sha256=nD1sm_nH0l9ADnwavySPdhgrNOvLX7nLYol7w306TFU,9720
17
17
  tests/urls.py,sha256=D5FhDSVAudurkrpkCZZPnDvgXSgifwFVB3nAlYBg7uQ,212
18
- dj_jwt_auth-1.5.7.dist-info/METADATA,sha256=_-gzhR70I8lAWW9VBXHEMiKSPm7RlbHzH4oOhyadN94,4369
19
- dj_jwt_auth-1.5.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
20
- dj_jwt_auth-1.5.7.dist-info/top_level.txt,sha256=58O7TdK-yECZcbmPc52KNlBFpjIUlENuZubCxaSOxus,17
21
- dj_jwt_auth-1.5.7.dist-info/RECORD,,
18
+ dj_jwt_auth-1.5.9.dist-info/METADATA,sha256=G-eFwyysmhdpRiAU6Jd7cx8ebR9QRTiAOz80Q25r8M4,4369
19
+ dj_jwt_auth-1.5.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
20
+ dj_jwt_auth-1.5.9.dist-info/top_level.txt,sha256=58O7TdK-yECZcbmPc52KNlBFpjIUlENuZubCxaSOxus,17
21
+ dj_jwt_auth-1.5.9.dist-info/RECORD,,
django_jwt/user.py CHANGED
@@ -43,7 +43,7 @@ class UserHandler:
43
43
  """Collect user data from KeyCloak"""
44
44
 
45
45
  user_data = oidc_handler.get_user_info(self.access_token)
46
- log.info(f"User data: {self.kwargs}, access_token: {self.access_token}")
46
+ log.info(f"User data: {user_data}, access_token: {self.access_token}")
47
47
  self.kwargs["email"] = user_data["email"].lower()
48
48
  self.kwargs.update(mapper(user_data))
49
49
 
@@ -82,7 +82,15 @@ class UserHandler:
82
82
  if user_modified_at:
83
83
  if not user_modified_at.tzinfo:
84
84
  user_modified_at = utc.localize(user_modified_at)
85
- if self.modified_at and user_modified_at < self.modified_at:
85
+ is_modified = user_modified_at < self.modified_at
86
+
87
+ log.info(
88
+ f"User modified at: {user_modified_at}, "
89
+ f"modified_at: {self.modified_at}, "
90
+ f"is_modified: {is_modified}",
91
+ f"email: {user.email}",
92
+ )
93
+ if self.modified_at and is_modified:
86
94
  self._update_user(user)
87
95
  if self.on_update:
88
96
  self.on_update(user, self.request)