Skip to content

Commit bb9a48f

Browse files
Update middleware.py
1 parent f129442 commit bb9a48f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/service_ml_forecast/middlewares/keycloak/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ async def _verify_jwt_token(token: str, valid_issuers: list[str]) -> dict[str, A
134134
if unverified_header.get("alg") != JWT_ALGORITHM_RS256:
135135
raise jwt.exceptions.InvalidTokenError("Invalid token algorithm: Expected RS256")
136136

137-
# Decode the token without verifying (we don't have the public key yet)
137+
# Decode the token without verifying (necessary so we can extract the issuer for retrieving the JWKS)
138138
unverified_payload = jwt.decode(token, options={"verify_signature": False, "verify_aud": False})
139139

140140
# Extract required claims

0 commit comments

Comments
 (0)