usso 0.28.12__py3-none-any.whl → 0.28.14__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.
@@ -16,12 +16,14 @@ class USSOAuthentication(UssoAuth):
16
16
  self,
17
17
  jwt_config: AvailableJwtConfigs | None = None,
18
18
  raise_exception: bool = True,
19
+ expected_token_type: str = "access",
19
20
  ):
20
21
  if jwt_config is None:
21
22
  jwt_config = AuthConfig()
22
23
 
23
24
  super().__init__(jwt_config=jwt_config)
24
25
  self.raise_exception = raise_exception
26
+ self.expected_token_type = expected_token_type
25
27
 
26
28
  def __call__(self, request: Request) -> UserData:
27
29
  return self.usso_access_security(request)
@@ -52,7 +54,9 @@ class USSOAuthentication(UssoAuth):
52
54
  token = self.get_request_jwt(request)
53
55
  if token:
54
56
  return self.user_data_from_token(
55
- token, raise_exception=self.raise_exception
57
+ token,
58
+ raise_exception=self.raise_exception,
59
+ expected_token_type=self.expected_token_type,
56
60
  )
57
61
 
58
62
  _handle_exception(
@@ -71,7 +75,9 @@ class USSOAuthentication(UssoAuth):
71
75
  token = self.get_request_jwt(websocket)
72
76
  if token:
73
77
  return self.user_data_from_token(
74
- token, raise_exception=self.raise_exception
78
+ token,
79
+ raise_exception=self.raise_exception,
80
+ expected_token_type=self.expected_token_type,
75
81
  )
76
82
  _handle_exception(
77
83
  "Unauthorized",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: usso
3
- Version: 0.28.12
3
+ Version: 0.28.14
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>
@@ -36,14 +36,18 @@ Provides-Extra: django
36
36
  Requires-Dist: Django>=3.2; extra == "django"
37
37
  Provides-Extra: dev
38
38
  Requires-Dist: check-manifest; extra == "dev"
39
+ Requires-Dist: pytest; extra == "dev"
40
+ Requires-Dist: pytest_asyncio; extra == "dev"
39
41
  Provides-Extra: test
40
42
  Requires-Dist: coverage; extra == "test"
41
43
  Provides-Extra: all
42
- Requires-Dist: fastapi; extra == "all"
43
- Requires-Dist: uvicorn; extra == "all"
44
- Requires-Dist: django; extra == "all"
45
- Requires-Dist: dev; extra == "all"
46
- Requires-Dist: test; extra == "all"
44
+ Requires-Dist: fastapi>=0.65.0; extra == "all"
45
+ Requires-Dist: uvicorn[standard]>=0.13.0; extra == "all"
46
+ Requires-Dist: Django>=3.2; extra == "all"
47
+ Requires-Dist: check-manifest; extra == "all"
48
+ Requires-Dist: pytest; extra == "all"
49
+ Requires-Dist: pytest_asyncio; extra == "all"
50
+ Requires-Dist: coverage; extra == "all"
47
51
  Dynamic: license-file
48
52
 
49
53
  # 🛡️ USSO Python Client SDK
@@ -7,7 +7,7 @@ usso/auth/config.py,sha256=wRMsR89tw_PbUY83ObuEMCWuj3_Y8gcuYj8yZ-PiDFs,3739
7
7
  usso/integrations/django/__init__.py,sha256=dKpbffHS5ouGtW6ooI2ivzjPmH_1rOBny85htR-KqrY,97
8
8
  usso/integrations/django/middleware.py,sha256=8b-VYQ3FRhLnXSl4ZfHBpiA6VLY4b7b0-YoE_X41SFM,3443
9
9
  usso/integrations/fastapi/__init__.py,sha256=ohToiqutHu3Okr8naunssDkamj1OdiG4OpPdBW0rt7U,204
10
- usso/integrations/fastapi/dependency.py,sha256=9CaRSvCNbrSQr7EQd6SEs7HhxULWvXLkEX89L5rsnZc,2543
10
+ usso/integrations/fastapi/dependency.py,sha256=Cq-rkCrmNIC8OT1OkdMxfIEkmQkl_pwqV7N7CiNnDSA,2801
11
11
  usso/integrations/fastapi/handler.py,sha256=MNDoBYdySumFsBgVw-xir3jXXH63KehFXKCh-pNnNZQ,386
12
12
  usso/models/user.py,sha256=eVZD1roaXkHiyO_fmMVoIAoE8AVvot4RTySJcYMe2uw,3760
13
13
  usso/session/__init__.py,sha256=tE4qWUdSI7iN_pywm47Mg8NKOTBa2nCNwCy3wCZWRmU,124
@@ -17,9 +17,9 @@ usso/session/session.py,sha256=a8iy7lI3cvi7NKi6V1PKfCZ2nLrGTS5sM6Kbu30tN7k,1636
17
17
  usso/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  usso/utils/method_utils.py,sha256=1NMN4le04PWXDSJZK-nf7q2IFqOMkwYcCnslFXAzlH8,355
19
19
  usso/utils/string_utils.py,sha256=7tziAa2Cwa7xhwM_NF4DSY3BHoqVaWgJ21VuV8LvhrY,253
20
- usso-0.28.12.dist-info/licenses/LICENSE.txt,sha256=ceC9ZJOV9H6CtQDcYmHOS46NA3dHJ_WD4J9blH513pc,1081
21
- usso-0.28.12.dist-info/METADATA,sha256=svX8bx5Ju1PpI7737vQodYH6oaZVa0bHDoSSk_rYZiA,4847
22
- usso-0.28.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
- usso-0.28.12.dist-info/entry_points.txt,sha256=4Zgpm5ELaAWPf0jPGJFz1_X69H7un8ycT3WdGoJ0Vvk,35
24
- usso-0.28.12.dist-info/top_level.txt,sha256=g9Jf6h1Oyidh0vPiFni7UHInTJjSvu6cUalpLTIvthg,5
25
- usso-0.28.12.dist-info/RECORD,,
20
+ usso-0.28.14.dist-info/licenses/LICENSE.txt,sha256=ceC9ZJOV9H6CtQDcYmHOS46NA3dHJ_WD4J9blH513pc,1081
21
+ usso-0.28.14.dist-info/METADATA,sha256=Tcgog9XyW4vJbH7TnWHrmv8Ztd_WKez5nCktU7pBkOI,5061
22
+ usso-0.28.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
+ usso-0.28.14.dist-info/entry_points.txt,sha256=4Zgpm5ELaAWPf0jPGJFz1_X69H7un8ycT3WdGoJ0Vvk,35
24
+ usso-0.28.14.dist-info/top_level.txt,sha256=g9Jf6h1Oyidh0vPiFni7UHInTJjSvu6cUalpLTIvthg,5
25
+ usso-0.28.14.dist-info/RECORD,,
File without changes