mirror of
https://github.com/velocitatem/cvfs.git
synced 2026-05-31 08:43:37 +00:00
allow jwt alg from token header
This commit is contained in:
@@ -74,11 +74,12 @@ class OidcTokenValidator:
|
||||
key = await self._get_key(header.get("kid"))
|
||||
if not key:
|
||||
raise TokenValidationError("Unable to resolve signing key")
|
||||
alg = header.get("alg") or key.get("alg") or "RS256"
|
||||
try:
|
||||
claims = jwt.decode(
|
||||
token,
|
||||
key,
|
||||
algorithms=[key.get("alg", "RS256")],
|
||||
algorithms=[alg],
|
||||
audience=self.audience,
|
||||
issuer=self.issuer,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user