mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
fix(identity): narrow jwt_claims type in principal adapter
This commit is contained in:
parent
a909d21f19
commit
3a52292a80
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ def _principal_from_uak(uak: "UserAPIKeyAuth") -> Principal:
|
|||
return ServiceAccountPrincipal(name=name) # type: ignore[arg-type]
|
||||
|
||||
if kind == "jwt":
|
||||
claims = uak.jwt_claims
|
||||
claims = uak.jwt_claims or {}
|
||||
aud = claims.get("aud")
|
||||
return JWTPrincipal(
|
||||
sub=claims.get("sub"),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue