usso 0.27.19__py3-none-any.whl → 0.27.21__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.
- usso/session/async_session.py +2 -2
- usso/session/session.py +4 -4
- {usso-0.27.19.dist-info → usso-0.27.21.dist-info}/METADATA +1 -1
- {usso-0.27.19.dist-info → usso-0.27.21.dist-info}/RECORD +8 -8
- {usso-0.27.19.dist-info → usso-0.27.21.dist-info}/LICENSE.txt +0 -0
- {usso-0.27.19.dist-info → usso-0.27.21.dist-info}/WHEEL +0 -0
- {usso-0.27.19.dist-info → usso-0.27.21.dist-info}/entry_points.txt +0 -0
- {usso-0.27.19.dist-info → usso-0.27.21.dist-info}/top_level.txt +0 -0
usso/session/async_session.py
CHANGED
@@ -29,7 +29,7 @@ class AsyncUssoSession(httpx.AsyncClient, BaseUssoSession):
|
|
29
29
|
user_id=user_id,
|
30
30
|
client=client,
|
31
31
|
)
|
32
|
-
if not self.api_key:
|
32
|
+
if not hasattr(self, "api_key") or not self.api_key:
|
33
33
|
self._refresh_sync()
|
34
34
|
|
35
35
|
def _prepare_refresh_request(self) -> tuple[dict, dict]:
|
@@ -89,7 +89,7 @@ class AsyncUssoSession(httpx.AsyncClient, BaseUssoSession):
|
|
89
89
|
return self._handle_refresh_response(response)
|
90
90
|
|
91
91
|
async def get_session(self):
|
92
|
-
if self.api_key:
|
92
|
+
if hasattr(self, "api_key") and self.api_key:
|
93
93
|
return self
|
94
94
|
|
95
95
|
if not self.access_token or is_expired(self.access_token):
|
usso/session/session.py
CHANGED
@@ -22,9 +22,9 @@ class UssoSession(httpx.Client, BaseUssoSession):
|
|
22
22
|
**kwargs,
|
23
23
|
):
|
24
24
|
|
25
|
-
httpx_kwargs = _filter_kwargs(kwargs, httpx.Client.__init__)
|
25
|
+
# httpx_kwargs = _filter_kwargs(kwargs, httpx.Client.__init__)
|
26
26
|
|
27
|
-
httpx.Client.__init__(self
|
27
|
+
httpx.Client.__init__(self) #, **httpx_kwargs)
|
28
28
|
|
29
29
|
BaseUssoSession.__init__(
|
30
30
|
self,
|
@@ -36,7 +36,7 @@ class UssoSession(httpx.Client, BaseUssoSession):
|
|
36
36
|
user_id=user_id,
|
37
37
|
client=client,
|
38
38
|
)
|
39
|
-
if not self.api_key:
|
39
|
+
if not hasattr(self, "api_key") or not self.api_key:
|
40
40
|
self._refresh()
|
41
41
|
|
42
42
|
def _refresh_api(self):
|
@@ -68,7 +68,7 @@ class UssoSession(httpx.Client, BaseUssoSession):
|
|
68
68
|
return response.json()
|
69
69
|
|
70
70
|
def get_session(self):
|
71
|
-
if self.api_key:
|
71
|
+
if hasattr(self, "api_key") and self.api_key:
|
72
72
|
return self
|
73
73
|
|
74
74
|
if not self.access_token or is_expired(self.access_token):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: usso
|
3
|
-
Version: 0.27.
|
3
|
+
Version: 0.27.21
|
4
4
|
Summary: A plug-and-play client for integrating universal single sign-on (SSO) with Python frameworks, enabling secure and seamless authentication across microservices.
|
5
5
|
Author-email: Mahdi Kiani <mahdikiany@gmail.com>
|
6
6
|
Maintainer-email: Mahdi Kiani <mahdikiany@gmail.com>
|
@@ -11,12 +11,12 @@ usso/django/middleware.py,sha256=EEEpHvMQ6QiWw2HY8zQ2Aec0RCATcLWsCKeyiPWJKio,324
|
|
11
11
|
usso/fastapi/__init__.py,sha256=0EcdOzb4f3yu9nILIdGWnlyUz-0VaVX2az1e3f2BusI,201
|
12
12
|
usso/fastapi/integration.py,sha256=IonxxNj_B9sG2j672rIzE047qo972vk7ch4-eGENp3Q,2638
|
13
13
|
usso/session/__init__.py,sha256=tE4qWUdSI7iN_pywm47Mg8NKOTBa2nCNwCy3wCZWRmU,124
|
14
|
-
usso/session/async_session.py,sha256=
|
14
|
+
usso/session/async_session.py,sha256=HxM5FA-QLtaLQ3Pc5ttwqfEQfzPajySR1SQ0qO-VJ7I,3578
|
15
15
|
usso/session/base_session.py,sha256=wZ96VPf0zz8zDRtjJrOmZ2S4XvEBLLZAc74A4iDy7G4,3369
|
16
|
-
usso/session/session.py,sha256=
|
17
|
-
usso-0.27.
|
18
|
-
usso-0.27.
|
19
|
-
usso-0.27.
|
20
|
-
usso-0.27.
|
21
|
-
usso-0.27.
|
22
|
-
usso-0.27.
|
16
|
+
usso/session/session.py,sha256=SWHHJr_s2P7vChbyp0OUqmIsdyP_Yed9-VuOWUInW0Y,2606
|
17
|
+
usso-0.27.21.dist-info/LICENSE.txt,sha256=ceC9ZJOV9H6CtQDcYmHOS46NA3dHJ_WD4J9blH513pc,1081
|
18
|
+
usso-0.27.21.dist-info/METADATA,sha256=ZKrTd-aerwKIqaHf0XCPIuWPW8XL7eP9cg5xdp7WMyE,4580
|
19
|
+
usso-0.27.21.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
20
|
+
usso-0.27.21.dist-info/entry_points.txt,sha256=4Zgpm5ELaAWPf0jPGJFz1_X69H7un8ycT3WdGoJ0Vvk,35
|
21
|
+
usso-0.27.21.dist-info/top_level.txt,sha256=g9Jf6h1Oyidh0vPiFni7UHInTJjSvu6cUalpLTIvthg,5
|
22
|
+
usso-0.27.21.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|