mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
(test) custom_auth.py
This commit is contained in:
parent
adf2e98038
commit
6d6c268352
1 changed files with 1 additions and 3 deletions
|
|
@ -8,10 +8,8 @@ load_dotenv()
|
|||
|
||||
async def user_api_key_auth(request: Request, api_key: str) -> UserAPIKeyAuth:
|
||||
try:
|
||||
from litellm.proxy.proxy_server import MISSING_BEARER
|
||||
|
||||
print(f"api_key: {api_key}")
|
||||
if api_key == MISSING_BEARER:
|
||||
if api_key == "":
|
||||
raise Exception(
|
||||
f"CustomAuth - Malformed API Key passed in. Ensure Key has `Bearer` prefix"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue