mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
(test) proxy_custom_auth
This commit is contained in:
parent
9fb68710be
commit
311957b615
1 changed files with 3 additions and 1 deletions
|
|
@ -8,8 +8,10 @@ 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 == "":
|
||||
if api_key == MISSING_BEARER:
|
||||
raise Exception(
|
||||
f"CustomAuth - Malformed API Key passed in. Ensure Key has `Bearer` prefix"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue