usso 0.24.7__py3-none-any.whl → 0.24.8__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/async_session.py +33 -0
- {usso-0.24.7.dist-info → usso-0.24.8.dist-info}/METADATA +1 -1
- {usso-0.24.7.dist-info → usso-0.24.8.dist-info}/RECORD +7 -7
- {usso-0.24.7.dist-info → usso-0.24.8.dist-info}/LICENSE.txt +0 -0
- {usso-0.24.7.dist-info → usso-0.24.8.dist-info}/WHEEL +0 -0
- {usso-0.24.7.dist-info → usso-0.24.8.dist-info}/entry_points.txt +0 -0
- {usso-0.24.7.dist-info → usso-0.24.8.dist-info}/top_level.txt +0 -0
usso/async_session.py
CHANGED
@@ -51,3 +51,36 @@ class AsyncUssoSession:
|
|
51
51
|
async def __aexit__(self, exc_type, exc_value, traceback):
|
52
52
|
if self.session:
|
53
53
|
await self.session.close() # Close the session properly
|
54
|
+
|
55
|
+
async def _request(self, method: str, url: str, **kwargs):
|
56
|
+
await self._ensure_valid_token() # Ensure valid token before any request
|
57
|
+
return await self.session.request(method, url, **kwargs)
|
58
|
+
|
59
|
+
async def get(self, url: str, **kwargs):
|
60
|
+
return await self._request("GET", url, **kwargs)
|
61
|
+
|
62
|
+
async def post(self, url: str, **kwargs):
|
63
|
+
return await self._request("POST", url, **kwargs)
|
64
|
+
|
65
|
+
async def put(self, url: str, **kwargs):
|
66
|
+
return await self._request("PUT", url, **kwargs)
|
67
|
+
|
68
|
+
async def patch(self, url: str, **kwargs):
|
69
|
+
return await self._request("PATCH", url, **kwargs)
|
70
|
+
|
71
|
+
async def delete(self, url: str, **kwargs):
|
72
|
+
return await self._request("DELETE", url, **kwargs)
|
73
|
+
|
74
|
+
async def head(self, url: str, **kwargs):
|
75
|
+
return await self._request("HEAD", url, **kwargs)
|
76
|
+
|
77
|
+
async def options(self, url: str, **kwargs):
|
78
|
+
return await self._request("OPTIONS", url, **kwargs)
|
79
|
+
|
80
|
+
async def close(self):
|
81
|
+
await self.session.close()
|
82
|
+
self.session = None
|
83
|
+
|
84
|
+
async def __del__(self):
|
85
|
+
if self.session:
|
86
|
+
await self.session.close()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: usso
|
3
|
-
Version: 0.24.
|
3
|
+
Version: 0.24.8
|
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>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
usso/__init__.py,sha256=NnOS_S1a-JKTOlGe1nw-kCL3m0y82mA2mDraus7BQ2o,120
|
2
2
|
usso/api.py,sha256=xlDq2nZNpq3mhAvqIbGEfANHNjJpPquSeULBfS7iMJw,5094
|
3
3
|
usso/async_api.py,sha256=rb-Xh5oudmZrPYM_iH_B75b5Z0Fvi1V1uurdcKE51w0,5551
|
4
|
-
usso/async_session.py,sha256=
|
4
|
+
usso/async_session.py,sha256=8cNVmbzQ_mh33JCe0NqdmCkIXBJOkFpSH1TOZb1y8NA,3102
|
5
5
|
usso/b64tools.py,sha256=HGQ0E59vzjrQo2-4jrcY03ebtTaYwTtCZ7KgJaEmxO0,610
|
6
6
|
usso/core.py,sha256=m6Y-g70FuPYZM3AMtsEVVToQkYrf4WwNVH8C4HZRzl8,4103
|
7
7
|
usso/exceptions.py,sha256=hawOAuVbvQtjgRfwp1KFZ4SmV7fh720y5Gom9JVA8W8,504
|
@@ -11,9 +11,9 @@ usso/django/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
usso/django/middleware.py,sha256=EEEpHvMQ6QiWw2HY8zQ2Aec0RCATcLWsCKeyiPWJKio,3245
|
12
12
|
usso/fastapi/__init__.py,sha256=0EcdOzb4f3yu9nILIdGWnlyUz-0VaVX2az1e3f2BusI,201
|
13
13
|
usso/fastapi/integration.py,sha256=VAUWaa7ChQ1jTtn8A136VgyG6t2kDo5pGK-3RgmNDVs,1669
|
14
|
-
usso-0.24.
|
15
|
-
usso-0.24.
|
16
|
-
usso-0.24.
|
17
|
-
usso-0.24.
|
18
|
-
usso-0.24.
|
19
|
-
usso-0.24.
|
14
|
+
usso-0.24.8.dist-info/LICENSE.txt,sha256=ceC9ZJOV9H6CtQDcYmHOS46NA3dHJ_WD4J9blH513pc,1081
|
15
|
+
usso-0.24.8.dist-info/METADATA,sha256=94xpCS11SWweVYRuhOg_l38LLQwR4DWVWoGYaoXshNQ,4231
|
16
|
+
usso-0.24.8.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
17
|
+
usso-0.24.8.dist-info/entry_points.txt,sha256=4Zgpm5ELaAWPf0jPGJFz1_X69H7un8ycT3WdGoJ0Vvk,35
|
18
|
+
usso-0.24.8.dist-info/top_level.txt,sha256=g9Jf6h1Oyidh0vPiFni7UHInTJjSvu6cUalpLTIvthg,5
|
19
|
+
usso-0.24.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|