Skip to content

Commit

Permalink
Merge pull request #2762 from jacobnguyenn/update-jwt-auth
Browse files Browse the repository at this point in the history
fix: still verify kid on single pub key fetched
  • Loading branch information
krrishdholakia committed Mar 30, 2024
2 parents 48ac36e + 4bf4be3 commit f44df7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion litellm/proxy/auth/handle_jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ async def get_public_key(self, kid: Optional[str]) -> dict:
public_key: Optional[dict] = None

if len(keys) == 1:
public_key = keys[0]
if kid is None or key["kid"] == kid:
public_key = keys[0]
elif len(keys) > 1:
for key in keys:
if kid is not None and key["kid"] == kid:
Expand Down

0 comments on commit f44df7b

Please sign in to comment.