usso 0.9.0__tar.gz → 0.11.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.
- {usso-0.9.0/src/usso.egg-info → usso-0.11.0}/PKG-INFO +1 -1
- {usso-0.9.0 → usso-0.11.0}/pyproject.toml +1 -1
- {usso-0.9.0 → usso-0.11.0}/src/usso/core.py +8 -3
- usso-0.11.0/src/usso/fastapi/__init__.py +1 -0
- {usso-0.9.0 → usso-0.11.0/src/usso.egg-info}/PKG-INFO +1 -1
- usso-0.9.0/src/usso/fastapi/__init__.py +0 -1
- {usso-0.9.0 → usso-0.11.0}/LICENSE.txt +0 -0
- {usso-0.9.0 → usso-0.11.0}/README.md +0 -0
- {usso-0.9.0 → usso-0.11.0}/setup.cfg +0 -0
- {usso-0.9.0 → usso-0.11.0}/src/usso/__init__.py +0 -0
- {usso-0.9.0 → usso-0.11.0}/src/usso/b64tools.py +1 -1
- {usso-0.9.0 → usso-0.11.0}/src/usso/exceptions.py +0 -0
- {usso-0.9.0 → usso-0.11.0}/src/usso/fastapi/integration.py +0 -0
- {usso-0.9.0 → usso-0.11.0}/src/usso/package_data.dat +0 -0
- {usso-0.9.0 → usso-0.11.0}/src/usso.egg-info/SOURCES.txt +0 -0
- {usso-0.9.0 → usso-0.11.0}/src/usso.egg-info/dependency_links.txt +0 -0
- {usso-0.9.0 → usso-0.11.0}/src/usso.egg-info/entry_points.txt +0 -0
- {usso-0.9.0 → usso-0.11.0}/src/usso.egg-info/requires.txt +0 -0
- {usso-0.9.0 → usso-0.11.0}/src/usso.egg-info/top_level.txt +0 -0
- {usso-0.9.0 → usso-0.11.0}/tests/test_simple.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: usso
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.11.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.
|
7
|
+
version = "0.11.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,12 +1,13 @@
|
|
1
1
|
import uuid
|
2
|
-
import base64
|
3
2
|
from functools import lru_cache
|
4
3
|
from typing import Optional, Tuple
|
5
4
|
|
6
5
|
import jwt
|
7
6
|
from pydantic import BaseModel
|
7
|
+
|
8
8
|
from . import b64tools
|
9
9
|
|
10
|
+
|
10
11
|
class UserData(BaseModel):
|
11
12
|
user_id: str
|
12
13
|
email: str | None = None
|
@@ -18,16 +19,20 @@ class UserData(BaseModel):
|
|
18
19
|
token: str | None = None
|
19
20
|
|
20
21
|
@property
|
21
|
-
def
|
22
|
+
def uid(self) -> uuid.UUID:
|
22
23
|
user_id = self.user_id
|
23
24
|
|
24
25
|
if user_id.startswith("u_"):
|
25
26
|
user_id = user_id[2:]
|
26
27
|
if 22 <= len(user_id) <= 24:
|
27
28
|
user_id = b64tools.b64_decode_uuid(user_id)
|
28
|
-
|
29
|
+
|
29
30
|
return uuid.UUID(user_id)
|
30
31
|
|
32
|
+
@property
|
33
|
+
def b64id(self) -> uuid.UUID:
|
34
|
+
return b64tools.b64_encode_uuid_strip(self.uid)
|
35
|
+
|
31
36
|
|
32
37
|
def get_authorization_scheme_param(
|
33
38
|
authorization_header_value: Optional[str],
|
@@ -0,0 +1 @@
|
|
1
|
+
from .integration import jwt_access_security, user_data_from_token
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: usso
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.11.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>
|
@@ -1 +0,0 @@
|
|
1
|
-
from .integration import user_data_from_token, jwt_access_security
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|