docs oauh 2.0 enterprise feature

This commit is contained in:
Ishaan Jaff 2024-08-16 14:00:24 -07:00
parent 0d41e2972b
commit ac833f415d
3 changed files with 22 additions and 0 deletions

View file

@ -201,6 +201,14 @@ async def user_api_key_auth(
if general_settings.get("enable_oauth2_auth", False) is True:
# return UserAPIKeyAuth object
# helper to check if the api_key is a valid oauth2 token
from litellm.proxy.proxy_server import premium_user
if premium_user is not True:
raise ValueError(
"Oauth2 token validation is only available for premium users"
+ CommonProxyErrors.not_premium_user.value
)
return await check_oauth2_token(token=api_key)
if general_settings.get("enable_jwt_auth", False) is True: