usso 0.16.0__tar.gz → 0.17.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: usso
3
- Version: 0.16.0
3
+ Version: 0.17.0
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.16.0"
7
+ version = "0.17.0"
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.8"
@@ -1 +1,3 @@
1
1
  from .core import UserData, user_data_from_token
2
+
3
+ __all__ = ["UserData", "user_data_from_token"]
@@ -1 +1,3 @@
1
1
  from .integration import jwt_access_security, jwt_access_security_ws
2
+
3
+ __all__ = ["jwt_access_security", "jwt_access_security_ws"]
@@ -14,7 +14,9 @@ async def jwt_access_security(request: Request) -> UserData | None:
14
14
  kwargs = {}
15
15
  authorization = request.headers.get("Authorization")
16
16
  if authorization:
17
- scheme, _, credentials = Usso().get_authorization_scheme_param(authorization)
17
+ scheme, _, credentials = Usso().get_authorization_scheme_param(
18
+ authorization
19
+ )
18
20
  if scheme.lower() == "bearer":
19
21
  token = credentials
20
22
  return Usso().user_data_from_token(token, **kwargs)
@@ -36,7 +38,9 @@ async def jwt_access_security_ws(websocket: WebSocket) -> UserData | None:
36
38
  kwargs = {}
37
39
  authorization = websocket.headers.get("Authorization")
38
40
  if authorization:
39
- scheme, _, credentials = Usso().get_authorization_scheme_param(authorization)
41
+ scheme, _, credentials = Usso().get_authorization_scheme_param(
42
+ authorization
43
+ )
40
44
  if scheme.lower() == "bearer":
41
45
  token = credentials
42
46
  return Usso().user_data_from_token(token, **kwargs)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: usso
3
- Version: 0.16.0
3
+ Version: 0.17.0
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