dj-jwt-auth 1.9.1__tar.gz → 1.9.2__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.9.1 → dj_jwt_auth-1.9.2}/PKG-INFO +1 -1
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/dj_jwt_auth.egg-info/PKG-INFO +1 -1
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/django_jwt/utils.py +2 -2
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/django_jwt/views.py +4 -1
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/setup.cfg +1 -1
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/MANIFEST.in +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/README.md +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/dj_jwt_auth.egg-info/SOURCES.txt +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/dj_jwt_auth.egg-info/dependency_links.txt +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/dj_jwt_auth.egg-info/requires.txt +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/dj_jwt_auth.egg-info/top_level.txt +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/django_jwt/__init__.py +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/django_jwt/config.py +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/django_jwt/exceptions.py +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/django_jwt/middleware.py +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/django_jwt/pkce.py +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/django_jwt/roles.py +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/django_jwt/settings.py +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/django_jwt/templates/admin/login.html +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/django_jwt/templates/django-jwt-index.html +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/django_jwt/urls.py +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/django_jwt/user.py +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/pyproject.toml +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/setup.py +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/tests/__init__.py +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/tests/models.py +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/tests/test.py +0 -0
- {dj_jwt_auth-1.9.1 → dj_jwt_auth-1.9.2}/tests/urls.py +0 -0
|
@@ -19,11 +19,11 @@ def get_alg(token: str) -> str:
|
|
|
19
19
|
return header["alg"]
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
def get_access_token(code: str, redirect_uri: str, pkce_secret: str) -> str:
|
|
22
|
+
def get_access_token(code: str, redirect_uri: str, pkce_secret: str, client_id: str) -> str:
|
|
23
23
|
token_endpoint = config.admin().get("token_endpoint")
|
|
24
24
|
data = {
|
|
25
25
|
"grant_type": "authorization_code",
|
|
26
|
-
"client_id":
|
|
26
|
+
"client_id": client_id,
|
|
27
27
|
"code": code,
|
|
28
28
|
"redirect_uri": redirect_uri,
|
|
29
29
|
"code_verifier": pkce_secret,
|
|
@@ -68,6 +68,7 @@ class InitiateView(View):
|
|
|
68
68
|
|
|
69
69
|
class CallbackView(View):
|
|
70
70
|
callback_view_name = "receive_redirect_view"
|
|
71
|
+
client_id = None
|
|
71
72
|
user = None
|
|
72
73
|
payload = None
|
|
73
74
|
|
|
@@ -83,7 +84,7 @@ class CallbackView(View):
|
|
|
83
84
|
|
|
84
85
|
redirect_uri = request.build_absolute_uri(self.callback_view_name)
|
|
85
86
|
if state := cache.get(state):
|
|
86
|
-
token = get_access_token(code, redirect_uri, state)
|
|
87
|
+
token = get_access_token(code, redirect_uri, state, self.client_id)
|
|
87
88
|
self.payload = oidc_handler.decode_token(token)
|
|
88
89
|
self.user = UserHandler(self.payload, request, token).get_user()
|
|
89
90
|
return super().dispatch(request, *args, **kwargs)
|
|
@@ -96,6 +97,8 @@ class StartOIDCAuthView(InitiateView):
|
|
|
96
97
|
|
|
97
98
|
|
|
98
99
|
class ReceiveRedirectView(CallbackView):
|
|
100
|
+
client_id = jwt_settings.OIDC_ADMIN_CLIENT_ID
|
|
101
|
+
|
|
99
102
|
def dispatch(self, request, *args, **kwargs):
|
|
100
103
|
try:
|
|
101
104
|
return super().dispatch(request, *args, **kwargs)
|
|
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
|