fix(team_endpoints.py): check if key belongs to team before returning /team/info

This commit is contained in:
Krrish Dholakia 2024-07-16 21:16:34 -07:00
parent dec5c7a2ba
commit ccbc7cfb9f
5 changed files with 15 additions and 9 deletions

View file

@ -6,19 +6,21 @@ Currently only supports admin.
JWT token must have 'litellm_proxy_admin' in scope.
"""
import jwt
import json
import os
from litellm.caching import DualCache
from litellm._logging import verbose_proxy_logger
from litellm.proxy._types import LiteLLM_JWTAuth, LiteLLM_UserTable
from litellm.proxy.utils import PrismaClient
from litellm.llms.custom_httpx.httpx_handler import HTTPHandler
from typing import Optional
import jwt
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
from litellm._logging import verbose_proxy_logger
from litellm.caching import DualCache
from litellm.llms.custom_httpx.httpx_handler import HTTPHandler
from litellm.proxy._types import LiteLLM_JWTAuth, LiteLLM_UserTable
from litellm.proxy.utils import PrismaClient
class JWTHandler:
"""