fix(proxy_server.py): check if team scope in jwt

This commit is contained in:
Krrish Dholakia 2024-03-26 14:01:02 -07:00
parent 4d7f4550e2
commit d90f44fe8e
2 changed files with 11 additions and 0 deletions

View file

@ -85,6 +85,11 @@ class JWTHandler:
return True
return False
def is_team(self, scopes: list) -> bool:
if self.litellm_proxy_roles.team_jwt_scope in scopes:
return True
return False
def get_end_user_id(self, token: dict, default_value: Optional[str]) -> str:
try:
if self.litellm_proxy_roles.team_id_jwt_field is not None: