usso 0.27.19__tar.gz → 0.27.21__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.
Files changed (27) hide show
  1. {usso-0.27.19/src/usso.egg-info → usso-0.27.21}/PKG-INFO +1 -1
  2. {usso-0.27.19 → usso-0.27.21}/pyproject.toml +1 -1
  3. {usso-0.27.19 → usso-0.27.21}/src/usso/session/async_session.py +2 -2
  4. {usso-0.27.19 → usso-0.27.21}/src/usso/session/session.py +4 -4
  5. {usso-0.27.19 → usso-0.27.21/src/usso.egg-info}/PKG-INFO +1 -1
  6. {usso-0.27.19 → usso-0.27.21}/LICENSE.txt +0 -0
  7. {usso-0.27.19 → usso-0.27.21}/README.md +0 -0
  8. {usso-0.27.19 → usso-0.27.21}/setup.cfg +0 -0
  9. {usso-0.27.19 → usso-0.27.21}/src/usso/__init__.py +0 -0
  10. {usso-0.27.19 → usso-0.27.21}/src/usso/b64tools.py +0 -0
  11. {usso-0.27.19 → usso-0.27.21}/src/usso/client/__init__.py +0 -0
  12. {usso-0.27.19 → usso-0.27.21}/src/usso/client/api.py +0 -0
  13. {usso-0.27.19 → usso-0.27.21}/src/usso/client/async_api.py +0 -0
  14. {usso-0.27.19 → usso-0.27.21}/src/usso/core.py +0 -0
  15. {usso-0.27.19 → usso-0.27.21}/src/usso/django/__init__.py +0 -0
  16. {usso-0.27.19 → usso-0.27.21}/src/usso/django/middleware.py +0 -0
  17. {usso-0.27.19 → usso-0.27.21}/src/usso/exceptions.py +0 -0
  18. {usso-0.27.19 → usso-0.27.21}/src/usso/fastapi/__init__.py +0 -0
  19. {usso-0.27.19 → usso-0.27.21}/src/usso/fastapi/integration.py +0 -0
  20. {usso-0.27.19 → usso-0.27.21}/src/usso/schemas.py +0 -0
  21. {usso-0.27.19 → usso-0.27.21}/src/usso/session/__init__.py +0 -0
  22. {usso-0.27.19 → usso-0.27.21}/src/usso/session/base_session.py +0 -0
  23. {usso-0.27.19 → usso-0.27.21}/src/usso.egg-info/SOURCES.txt +0 -0
  24. {usso-0.27.19 → usso-0.27.21}/src/usso.egg-info/dependency_links.txt +0 -0
  25. {usso-0.27.19 → usso-0.27.21}/src/usso.egg-info/entry_points.txt +0 -0
  26. {usso-0.27.19 → usso-0.27.21}/src/usso.egg-info/requires.txt +0 -0
  27. {usso-0.27.19 → usso-0.27.21}/src/usso.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: usso
3
- Version: 0.27.19
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>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "usso"
7
- version = "0.27.19"
7
+ version = "0.27.21"
8
8
  description = "A plug-and-play client for integrating universal single sign-on (SSO) with Python frameworks, enabling secure and seamless authentication across microservices."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -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):
@@ -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, **httpx_kwargs)
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.19
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>
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