mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-14 02:22:54 +00:00
fix(user_api_key_auth.py): more precisely expand scope to handle 'basic' tokens
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -85,8 +85,10 @@ def _get_bearer_token(
|
||||
):
|
||||
if api_key.startswith("Bearer "): # ensure Bearer token passed in
|
||||
api_key = api_key.replace("Bearer ", "") # extract the token
|
||||
elif api_key.startswith("Basic "):
|
||||
api_key = api_key.replace("Basic ", "") # handle langfuse input
|
||||
else:
|
||||
api_key = api_key
|
||||
api_key = ""
|
||||
return api_key
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user