workos 5.26.0__py3-none-any.whl → 5.26.1__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.
- workos/__about__.py +1 -1
- workos/session.py +9 -3
- {workos-5.26.0.dist-info → workos-5.26.1.dist-info}/METADATA +1 -1
- {workos-5.26.0.dist-info → workos-5.26.1.dist-info}/RECORD +7 -7
- {workos-5.26.0.dist-info → workos-5.26.1.dist-info}/LICENSE +0 -0
- {workos-5.26.0.dist-info → workos-5.26.1.dist-info}/WHEEL +0 -0
- {workos-5.26.0.dist-info → workos-5.26.1.dist-info}/top_level.txt +0 -0
workos/__about__.py
CHANGED
workos/session.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
from typing import TYPE_CHECKING, List, Protocol
|
|
3
3
|
|
|
4
|
+
from functools import lru_cache
|
|
4
5
|
import json
|
|
5
6
|
from typing import Any, Dict, Optional, Union, cast
|
|
6
7
|
import jwt
|
|
@@ -21,6 +22,11 @@ if TYPE_CHECKING:
|
|
|
21
22
|
from workos.user_management import AsyncUserManagement, UserManagement
|
|
22
23
|
|
|
23
24
|
|
|
25
|
+
@lru_cache(maxsize=None)
|
|
26
|
+
def _get_jwks_client(jwks_url: str) -> PyJWKClient:
|
|
27
|
+
return PyJWKClient(jwks_url)
|
|
28
|
+
|
|
29
|
+
|
|
24
30
|
class SessionModule(Protocol):
|
|
25
31
|
user_management: "UserManagementModule"
|
|
26
32
|
client_id: str
|
|
@@ -46,7 +52,7 @@ class SessionModule(Protocol):
|
|
|
46
52
|
self.session_data = session_data
|
|
47
53
|
self.cookie_password = cookie_password
|
|
48
54
|
|
|
49
|
-
self.jwks =
|
|
55
|
+
self.jwks = _get_jwks_client(self.user_management.get_jwks_url())
|
|
50
56
|
|
|
51
57
|
# Algorithms are hardcoded for security reasons. See https://pyjwt.readthedocs.io/en/stable/algorithms.html#specifying-an-algorithm
|
|
52
58
|
self.jwk_algorithms = ["RS256"]
|
|
@@ -164,7 +170,7 @@ class Session(SessionModule):
|
|
|
164
170
|
self.session_data = session_data
|
|
165
171
|
self.cookie_password = cookie_password
|
|
166
172
|
|
|
167
|
-
self.jwks =
|
|
173
|
+
self.jwks = _get_jwks_client(self.user_management.get_jwks_url())
|
|
168
174
|
|
|
169
175
|
# Algorithms are hardcoded for security reasons. See https://pyjwt.readthedocs.io/en/stable/algorithms.html#specifying-an-algorithm
|
|
170
176
|
self.jwk_algorithms = ["RS256"]
|
|
@@ -254,7 +260,7 @@ class AsyncSession(SessionModule):
|
|
|
254
260
|
self.session_data = session_data
|
|
255
261
|
self.cookie_password = cookie_password
|
|
256
262
|
|
|
257
|
-
self.jwks =
|
|
263
|
+
self.jwks = _get_jwks_client(self.user_management.get_jwks_url())
|
|
258
264
|
|
|
259
265
|
# Algorithms are hardcoded for security reasons. See https://pyjwt.readthedocs.io/en/stable/algorithms.html#specifying-an-algorithm
|
|
260
266
|
self.jwk_algorithms = ["RS256"]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
workos/__about__.py,sha256=
|
|
1
|
+
workos/__about__.py,sha256=Yeny6sT7_5IZF4eNBVwdtfRNw77nP8ErNtAKbJN0Ey8,406
|
|
2
2
|
workos/__init__.py,sha256=hOdbO_MJCvpLx8EbRjQg-fvFAB-glJmrmxUZK8kWG0k,167
|
|
3
3
|
workos/_base_client.py,sha256=YWLXBpd0YeID3WKYZkKa4l9ZuB9e6HgdLmPKZIzXsME,3599
|
|
4
4
|
workos/_client_configuration.py,sha256=g3eXhtrEMN6CW0hZ5uHb2PmLurXjyBkWZeQYMPeJD6s,222
|
|
@@ -15,7 +15,7 @@ workos/organizations.py,sha256=ugPRhwN8cN2O6qOCf7wj8Wus-oeRKXlNe2642PSl_n4,12266
|
|
|
15
15
|
workos/passwordless.py,sha256=NGXDoxomBkrIml8-VHXH1HvCFMqotQ-YhRobUQXpVZs,3203
|
|
16
16
|
workos/portal.py,sha256=lzf3fnOor4AyVdHCHMuJzVSpAC9LWWdC5sZIRtCsb0c,2443
|
|
17
17
|
workos/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
workos/session.py,sha256=
|
|
18
|
+
workos/session.py,sha256=EXurDn7wTRsciRSN_nN98tRD9hhw28eIMLrMNxWhyy0,12071
|
|
19
19
|
workos/sso.py,sha256=ZBC3y-IRmxG0jPd0BOj7s7XQkXJoTLUg1fx-h3Gfy4g,13541
|
|
20
20
|
workos/user_management.py,sha256=qy21HxYVO40xo7TvCGVxvGWdYIFHZTVnUJTpCQIN2ko,77113
|
|
21
21
|
workos/vault.py,sha256=SJXr3nJ03qJFuf30FjevMD6LLlDNX3MGaKlYGgICRRE,15657
|
|
@@ -125,8 +125,8 @@ workos/utils/crypto_provider.py,sha256=QeQSR4t9xLlb90kEfl8onVUsf1yCkYq0EjFTxK0mU
|
|
|
125
125
|
workos/utils/http_client.py,sha256=TM5yMFFExmAE8D2Z43-5O301tRbnylLG0aXO0isGorE,6197
|
|
126
126
|
workos/utils/pagination_order.py,sha256=_-et1DDJLG0czarTU7op4W6RA0V1f85GNsUgtyRU55Q,70
|
|
127
127
|
workos/utils/request_helper.py,sha256=NaO16qPPbSNnCeE0fiNKYb8gM-dK_okYVJbLGrEGXz8,793
|
|
128
|
-
workos-5.26.
|
|
129
|
-
workos-5.26.
|
|
130
|
-
workos-5.26.
|
|
131
|
-
workos-5.26.
|
|
132
|
-
workos-5.26.
|
|
128
|
+
workos-5.26.1.dist-info/LICENSE,sha256=mU--WL1JzelH2tXpKVoOlpud4cpqKSRTtdArCvYZmb4,1063
|
|
129
|
+
workos-5.26.1.dist-info/METADATA,sha256=UNaV67NZvkz4ORGHsBxbDz50mrl5_PTspQnGRYJ0eIc,4187
|
|
130
|
+
workos-5.26.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
131
|
+
workos-5.26.1.dist-info/top_level.txt,sha256=ZFskIfue1Tw-JwjyIXRvdsAl9i0DX9VbqmgICXV84Sk,7
|
|
132
|
+
workos-5.26.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|