usso 0.16.0__py3-none-any.whl → 0.17.0__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/__init__.py CHANGED
@@ -1 +1,3 @@
1
1
  from .core import UserData, user_data_from_token
2
+
3
+ __all__ = ["UserData", "user_data_from_token"]
usso/fastapi/__init__.py CHANGED
@@ -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>
@@ -0,0 +1,14 @@
1
+ usso/__init__.py,sha256=-H-krZLJU9SzeeczVOu0N97iPJ7y-Q6diFdtDsl767Q,97
2
+ usso/api.py,sha256=RL13XwcnmbH4LVbjojwiwp8L9eioL_GKOkCyLaU0b7w,3263
3
+ usso/b64tools.py,sha256=6YCBx2lLaYFdk36f064VNZ1RejJTHtmgxqq0eT1sCwQ,518
4
+ usso/core.py,sha256=tkwvnDmDnB6SS8QqSv_eC1I_wwR7ld5BXeahldAa5EA,3023
5
+ usso/exceptions.py,sha256=hawOAuVbvQtjgRfwp1KFZ4SmV7fh720y5Gom9JVA8W8,504
6
+ usso/package_data.dat,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ usso/fastapi/__init__.py,sha256=6oGexGnnxkosRxnJ-pkGu1R2rjtjZ8iMikvB_eOQV3I,129
8
+ usso/fastapi/integration.py,sha256=9Q10dfy8UagOkmG49-Ar0mj6PPsiKS8ioLFgBIREpWQ,1823
9
+ usso-0.17.0.dist-info/LICENSE.txt,sha256=ceC9ZJOV9H6CtQDcYmHOS46NA3dHJ_WD4J9blH513pc,1081
10
+ usso-0.17.0.dist-info/METADATA,sha256=5rA4ox1itsn65exIAuy-Q7_9F-ltvJWZWH1C-8ayEiA,4334
11
+ usso-0.17.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
12
+ usso-0.17.0.dist-info/entry_points.txt,sha256=4Zgpm5ELaAWPf0jPGJFz1_X69H7un8ycT3WdGoJ0Vvk,35
13
+ usso-0.17.0.dist-info/top_level.txt,sha256=g9Jf6h1Oyidh0vPiFni7UHInTJjSvu6cUalpLTIvthg,5
14
+ usso-0.17.0.dist-info/RECORD,,
@@ -1,14 +0,0 @@
1
- usso/__init__.py,sha256=fluJnb9X2ECUnUA0lNNR2xHdn3uSI2RVErQiFlqbOiU,49
2
- usso/api.py,sha256=RL13XwcnmbH4LVbjojwiwp8L9eioL_GKOkCyLaU0b7w,3263
3
- usso/b64tools.py,sha256=6YCBx2lLaYFdk36f064VNZ1RejJTHtmgxqq0eT1sCwQ,518
4
- usso/core.py,sha256=tkwvnDmDnB6SS8QqSv_eC1I_wwR7ld5BXeahldAa5EA,3023
5
- usso/exceptions.py,sha256=hawOAuVbvQtjgRfwp1KFZ4SmV7fh720y5Gom9JVA8W8,504
6
- usso/package_data.dat,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- usso/fastapi/__init__.py,sha256=WqTIF9BNKlq5f0H8Vk-fcQawPWZMclwuD8QwO4agW7I,69
8
- usso/fastapi/integration.py,sha256=rkR9uZbe-DEBMgHYtIaP3QUhL6hWHM6edFhBDJQWuz0,1779
9
- usso-0.16.0.dist-info/LICENSE.txt,sha256=ceC9ZJOV9H6CtQDcYmHOS46NA3dHJ_WD4J9blH513pc,1081
10
- usso-0.16.0.dist-info/METADATA,sha256=zKyEYZR741xiYumQ5VCZTJQiKCv8b7cBmoSmpgnaVpo,4334
11
- usso-0.16.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
12
- usso-0.16.0.dist-info/entry_points.txt,sha256=4Zgpm5ELaAWPf0jPGJFz1_X69H7un8ycT3WdGoJ0Vvk,35
13
- usso-0.16.0.dist-info/top_level.txt,sha256=g9Jf6h1Oyidh0vPiFni7UHInTJjSvu6cUalpLTIvthg,5
14
- usso-0.16.0.dist-info/RECORD,,
File without changes