latch-asgi 1.0.4__tar.gz → 1.0.5__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.4 → latch_asgi-1.0.5}/PKG-INFO +1 -1
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/latch_asgi/auth.py +3 -3
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/pyproject.toml +1 -1
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/COPYING +0 -0
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/README.md +0 -0
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/latch_asgi/__init__.py +0 -0
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/latch_asgi/asgi_iface.py +0 -0
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/latch_asgi/config.py +0 -0
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/latch_asgi/context/__init__.py +0 -0
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/latch_asgi/context/common.py +0 -0
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/latch_asgi/context/http.py +0 -0
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/latch_asgi/context/websocket.py +0 -0
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/latch_asgi/datadog_propagator.py +0 -0
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/latch_asgi/framework/__init__.py +0 -0
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/latch_asgi/framework/common.py +0 -0
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/latch_asgi/framework/http.py +0 -0
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/latch_asgi/framework/websocket.py +0 -0
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/latch_asgi/py.typed +0 -0
- {latch_asgi-1.0.4 → latch_asgi-1.0.5}/latch_asgi/server.py +0 -0
|
@@ -147,15 +147,15 @@ def get_signer_sub(auth_header: str) -> Authorization:
|
|
|
147
147
|
# ) from e
|
|
148
148
|
|
|
149
149
|
with app_tracer.start_as_current_span("decode jwt"):
|
|
150
|
+
audience = config.audience if jwt_key != config.self_signed_jwk else None
|
|
150
151
|
try:
|
|
151
152
|
jwt_data: dict[str, str] = jwt.decode(
|
|
152
153
|
oauth_token,
|
|
153
154
|
key=jwt_key,
|
|
154
155
|
algorithms=["RS256", "HS256"],
|
|
155
156
|
# fixme(maximsmol): gut this abomination
|
|
156
|
-
audience=
|
|
157
|
-
|
|
158
|
-
),
|
|
157
|
+
audience=audience,
|
|
158
|
+
options={"verify_aud": audience is not None},
|
|
159
159
|
)
|
|
160
160
|
except jwt.exceptions.InvalidTokenError as e:
|
|
161
161
|
# todo(maximsmol): filter out scope failures and include the correct error code
|
|
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
|