fix(user_api_key_auth.py): more precisely expand scope to handle 'basic' tokens
This commit is contained in:
parent
742e3cbccf
commit
5fdbfcee44
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
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user