mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-25 01:02:15 +00:00
fix(jwt): guard litellm_jwtauth access in auth_jwt global path
JWTHandler() can be constructed without update_environment() being called (tests do this directly), in which case self.litellm_jwtauth does not exist. Accessing it raises AttributeError before getattr can fall back. Use the same safe pattern other call sites use.
This commit is contained in:
parent
86cf3efd16
commit
1434ad3cc6
1 changed files with 3 additions and 1 deletions
|
|
@ -1058,7 +1058,9 @@ class JWTHandler:
|
|||
)
|
||||
|
||||
decode_kwargs = self._build_decode_kwargs(
|
||||
has_issuer_config=bool(getattr(self.litellm_jwtauth, "issuers", None))
|
||||
has_issuer_config=bool(
|
||||
getattr(getattr(self, "litellm_jwtauth", None), "issuers", None)
|
||||
)
|
||||
)
|
||||
|
||||
public_key = await self.get_public_key(kid=kid)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue