usso 0.17.0__py3-none-any.whl → 0.19.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,3 +1,3 @@
1
- from .core import UserData, user_data_from_token
2
-
3
- __all__ = ["UserData", "user_data_from_token"]
1
+ from .core import UserData, Usso
2
+
3
+ __all__ = ["UserData", "Usso"]
usso/api.py CHANGED
@@ -65,10 +65,14 @@ class UssoAPI(metaclass=Singleton):
65
65
  return self._request(endpoint=f"website/users/{user_id}/credentials/")
66
66
 
67
67
  def get_user_by_credentials(self, credentials: dict):
68
- return self._request(endpoint="website/users/credentials/", data=credentials)
68
+ return self._request(
69
+ endpoint="website/users/credentials/", data=credentials
70
+ )
69
71
 
70
72
  def create_user(self, user_data: dict):
71
- return self._request(method="post", endpoint="website/users/", data=user_data)
73
+ return self._request(
74
+ method="post", endpoint="website/users/", data=user_data
75
+ )
72
76
 
73
77
  def create_user_credentials(self, user_id: str, credentials: dict):
74
78
  return self._request(
@@ -82,7 +86,9 @@ class UssoAPI(metaclass=Singleton):
82
86
  ):
83
87
  if credentials:
84
88
  user_data["authenticators"] = [credentials]
85
- return self._request(method="post", endpoint="website/users/", data=user_data)
89
+ return self._request(
90
+ method="post", endpoint="website/users/", data=user_data
91
+ )
86
92
 
87
93
  def get_user_payload(self, user_id: str):
88
94
  return self._request(endpoint=f"website/users/{user_id}/payload/")
usso/core.py CHANGED
@@ -41,7 +41,7 @@ class UserData(BaseModel):
41
41
 
42
42
 
43
43
  class Usso(metaclass=Singleton):
44
- def __init__(self, jwks_url: str|None = None):
44
+ def __init__(self, jwks_url: str | None = None):
45
45
  if jwks_url is None:
46
46
  jwks_url = os.getenv("USSO_JWKS_URL")
47
47
  self.jwks_url = jwks_url
@@ -50,7 +50,8 @@ class Usso(metaclass=Singleton):
50
50
  def get_jwks_keys(self):
51
51
  return jwt.PyJWKClient(self.jwks_url)
52
52
 
53
- def get_authorization_scheme_param(self,
53
+ def get_authorization_scheme_param(
54
+ self,
54
55
  authorization_header_value: Optional[str],
55
56
  ) -> Tuple[str, str]:
56
57
  if not authorization_header_value:
usso/fastapi/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  from .integration import jwt_access_security, jwt_access_security_ws
2
2
 
3
- __all__ = ["jwt_access_security", "jwt_access_security_ws"]
3
+ __all__ = ["jwt_access_security", "jwt_access_security_ws"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: usso
3
- Version: 0.17.0
3
+ Version: 0.19.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=RN0E6HI9kHedvDxheDPVWiAmh-169IrhXfvq_sHphQc,65
2
+ usso/api.py,sha256=Sxo1JJOzfjSuidmFWfdE4g2CrllLxxWjzrW9VXSpKP4,3329
3
+ usso/b64tools.py,sha256=6YCBx2lLaYFdk36f064VNZ1RejJTHtmgxqq0eT1sCwQ,518
4
+ usso/core.py,sha256=3K6LMsryvqf3b7NZwNUt7Hx31xJ9KX3g7Pa6HBjkY4o,3034
5
+ usso/exceptions.py,sha256=hawOAuVbvQtjgRfwp1KFZ4SmV7fh720y5Gom9JVA8W8,504
6
+ usso/package_data.dat,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ usso/fastapi/__init__.py,sha256=TRTDVJo8bwZQDAuCQFhh-g1XbIspf6TdFYXGAO5cgAU,130
8
+ usso/fastapi/integration.py,sha256=9Q10dfy8UagOkmG49-Ar0mj6PPsiKS8ioLFgBIREpWQ,1823
9
+ usso-0.19.0.dist-info/LICENSE.txt,sha256=ceC9ZJOV9H6CtQDcYmHOS46NA3dHJ_WD4J9blH513pc,1081
10
+ usso-0.19.0.dist-info/METADATA,sha256=xbjJB8mJRoyGJtecwNRR32fvcztbGYFb_dZHEaKoX74,4334
11
+ usso-0.19.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
12
+ usso-0.19.0.dist-info/entry_points.txt,sha256=4Zgpm5ELaAWPf0jPGJFz1_X69H7un8ycT3WdGoJ0Vvk,35
13
+ usso-0.19.0.dist-info/top_level.txt,sha256=g9Jf6h1Oyidh0vPiFni7UHInTJjSvu6cUalpLTIvthg,5
14
+ usso-0.19.0.dist-info/RECORD,,
@@ -1,14 +0,0 @@
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,,
File without changes