simple-module-auth 0.0.39__tar.gz → 0.0.41__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.
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/PKG-INFO +4 -4
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/auth/contracts/schemas.py +6 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/package.json +1 -1
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/pyproject.toml +4 -4
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/.gitignore +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/LICENSE +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/README.md +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/auth/__init__.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/auth/_route_match.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/auth/contracts/__init__.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/auth/contracts/provider.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/auth/contracts/resolver.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/auth/contracts/tokens.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/auth/deps.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/auth/locales/de.json +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/auth/locales/en.json +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/auth/locales/es.json +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/auth/middleware.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/auth/module.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/auth/py.typed +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/auth/state.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/tests/test_auth_middleware.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/tests/test_auth_next_target.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/tests/test_auth_parse_bearer.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/tests/test_auth_provider_protocol.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/tests/test_auth_unknown_paths.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/tests/test_deps.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/tests/test_module.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/tests/test_resolver_registry.py +0 -0
- {simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/tests/test_user_context.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: simple_module_auth
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.41
|
|
4
4
|
Summary: Session-cookie authentication primitives — middleware, login/logout, redirect helpers for simple_module
|
|
5
5
|
Project-URL: Homepage, https://github.com/antosubash/simple_module_python
|
|
6
6
|
Project-URL: Repository, https://github.com/antosubash/simple_module_python
|
|
@@ -22,9 +22,9 @@ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
|
22
22
|
Classifier: Typing :: Typed
|
|
23
23
|
Requires-Python: >=3.12
|
|
24
24
|
Requires-Dist: itsdangerous<3,>=2.2
|
|
25
|
-
Requires-Dist: simple-module-core==0.0.
|
|
26
|
-
Requires-Dist: simple-module-db==0.0.
|
|
27
|
-
Requires-Dist: simple-module-hosting==0.0.
|
|
25
|
+
Requires-Dist: simple-module-core==0.0.41
|
|
26
|
+
Requires-Dist: simple-module-db==0.0.41
|
|
27
|
+
Requires-Dist: simple-module-hosting==0.0.41
|
|
28
28
|
Description-Content-Type: text/markdown
|
|
29
29
|
|
|
30
30
|
# simple_module_auth
|
|
@@ -58,6 +58,9 @@ class UserContext:
|
|
|
58
58
|
# routes). ``None`` (a session, a service key) requires nothing.
|
|
59
59
|
required_permission: str | None = None
|
|
60
60
|
|
|
61
|
+
# Providers must explicitly attest ownership of the principal's email.
|
|
62
|
+
email_verified: bool = False
|
|
63
|
+
|
|
61
64
|
@property
|
|
62
65
|
def is_scoped(self) -> bool:
|
|
63
66
|
"""Whether a scope cap applies (any token-authenticated principal)."""
|
|
@@ -83,6 +86,7 @@ class UserContext:
|
|
|
83
86
|
return cls(
|
|
84
87
|
id=str(user.id),
|
|
85
88
|
email=user.email,
|
|
89
|
+
email_verified=getattr(user, "is_verified", False) is True,
|
|
86
90
|
name=user.full_name or user.email,
|
|
87
91
|
roles=[r.name for r in user.roles],
|
|
88
92
|
auth_kind=auth_kind,
|
|
@@ -98,6 +102,7 @@ class UserContext:
|
|
|
98
102
|
return {
|
|
99
103
|
"id": self.id,
|
|
100
104
|
"email": self.email,
|
|
105
|
+
"email_verified": self.email_verified,
|
|
101
106
|
"name": self.name,
|
|
102
107
|
"roles": list(self.roles),
|
|
103
108
|
"tenant_id": self.tenant_id,
|
|
@@ -117,6 +122,7 @@ class UserContext:
|
|
|
117
122
|
return cls(
|
|
118
123
|
id=str(payload["id"]),
|
|
119
124
|
email=str(payload["email"]),
|
|
125
|
+
email_verified=payload.get("email_verified") is True,
|
|
120
126
|
name=str(payload["name"]),
|
|
121
127
|
roles=list(payload.get("roles") or []),
|
|
122
128
|
tenant_id=payload.get("tenant_id"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "simple_module_auth"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.41"
|
|
4
4
|
description = "Session-cookie authentication primitives — middleware, login/logout, redirect helpers for simple_module"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = "MIT"
|
|
@@ -22,9 +22,9 @@ classifiers = [
|
|
|
22
22
|
]
|
|
23
23
|
dependencies = [
|
|
24
24
|
"itsdangerous>=2.2,<3",
|
|
25
|
-
"simple_module_core==0.0.
|
|
26
|
-
"simple_module_db==0.0.
|
|
27
|
-
"simple_module_hosting==0.0.
|
|
25
|
+
"simple_module_core==0.0.41",
|
|
26
|
+
"simple_module_db==0.0.41",
|
|
27
|
+
"simple_module_hosting==0.0.41",
|
|
28
28
|
]
|
|
29
29
|
|
|
30
30
|
[project.entry-points.simple_module]
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{simple_module_auth-0.0.39 → simple_module_auth-0.0.41}/tests/test_auth_provider_protocol.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|