mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
refactor(handle_jwt.py): print jwt version
This commit is contained in:
parent
9ce7aeab67
commit
1c68a7fd1d
1 changed files with 3 additions and 1 deletions
|
@ -8,6 +8,8 @@ JWT token must have 'litellm_proxy_admin' in scope.
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
import jwt
|
import jwt
|
||||||
|
|
||||||
|
print(jwt.__version__) # noqa
|
||||||
from jwt.algorithms import RSAAlgorithm
|
from jwt.algorithms import RSAAlgorithm
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
@ -74,7 +76,7 @@ class JWTHandler:
|
||||||
return scopes
|
return scopes
|
||||||
|
|
||||||
async def auth_jwt(self, token: str) -> dict:
|
async def auth_jwt(self, token: str) -> dict:
|
||||||
keys_url = os.getenv("OPENID_PUBLIC_KEY_URL")
|
keys_url = os.getenv("JWT_PUBLIC_KEY_URL")
|
||||||
|
|
||||||
async with self.http_handler as http:
|
async with self.http_handler as http:
|
||||||
response = await http.get(keys_url)
|
response = await http.get(keys_url)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue