latch-asgi 1.0.3__tar.gz → 1.0.4__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.
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/PKG-INFO +1 -1
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/latch_asgi/auth.py +7 -1
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/pyproject.toml +1 -1
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/COPYING +0 -0
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/README.md +0 -0
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/latch_asgi/__init__.py +0 -0
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/latch_asgi/asgi_iface.py +0 -0
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/latch_asgi/config.py +0 -0
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/latch_asgi/context/__init__.py +0 -0
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/latch_asgi/context/common.py +0 -0
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/latch_asgi/context/http.py +0 -0
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/latch_asgi/context/websocket.py +0 -0
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/latch_asgi/datadog_propagator.py +0 -0
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/latch_asgi/framework/__init__.py +0 -0
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/latch_asgi/framework/common.py +0 -0
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/latch_asgi/framework/http.py +0 -0
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/latch_asgi/framework/websocket.py +0 -0
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/latch_asgi/py.typed +0 -0
- {latch_asgi-1.0.3 → latch_asgi-1.0.4}/latch_asgi/server.py +0 -0
|
@@ -27,7 +27,8 @@ authentication_header_regex = re.compile(
|
|
|
27
27
|
Bearer \s+ (?P<oauth_token>.*) |
|
|
28
28
|
Latch-Execution-Token \s+ (?P<execution_token>.*) |
|
|
29
29
|
Latch-SDK-Token \s+ (?P<sdk_token>.*) |
|
|
30
|
-
Latch-X-Server-Token \s+ (?P<server_token>.*)
|
|
30
|
+
Latch-X-Server-Token \s+ (?P<server_token>.*) |
|
|
31
|
+
Latch-Session-Token \s+ (?P<session_token>.*)
|
|
31
32
|
)$
|
|
32
33
|
""",
|
|
33
34
|
re.IGNORECASE | re.VERBOSE,
|
|
@@ -58,6 +59,7 @@ class _HTTPUnauthorized(HTTPErrorResponse):
|
|
|
58
59
|
class Authorization:
|
|
59
60
|
oauth_sub: str | None = None
|
|
60
61
|
execution_token: str | None = None
|
|
62
|
+
session_token: str | None = None
|
|
61
63
|
sdk_token: str | None = None
|
|
62
64
|
cross_server_token: str | None = None
|
|
63
65
|
|
|
@@ -105,6 +107,10 @@ def get_signer_sub(auth_header: str) -> Authorization:
|
|
|
105
107
|
if sdk_token is not None:
|
|
106
108
|
return Authorization(sdk_token=sdk_token)
|
|
107
109
|
|
|
110
|
+
session_token = auth_match.group("session_token")
|
|
111
|
+
if session_token is not None:
|
|
112
|
+
return Authorization(session_token=session_token)
|
|
113
|
+
|
|
108
114
|
cross_server_token = auth_match.group("server_token")
|
|
109
115
|
if cross_server_token is not None:
|
|
110
116
|
if (
|
|
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
|