aboutsummaryrefslogtreecommitdiff
path: root/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth_basic.py
diff options
context:
space:
mode:
Diffstat (limited to '.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth_basic.py')
-rw-r--r--.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth_basic.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth_basic.py b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth_basic.py
new file mode 100644
index 00000000..4d633a54
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/litellm/proxy/example_config_yaml/custom_auth_basic.py
@@ -0,0 +1,14 @@
+from fastapi import Request
+
+from litellm.proxy._types import UserAPIKeyAuth
+
+
+async def user_api_key_auth(request: Request, api_key: str) -> UserAPIKeyAuth:
+ try:
+ return UserAPIKeyAuth(
+ api_key="best-api-key-ever",
+ user_id="best-user-id-ever",
+ team_id="best-team-id-ever",
+ )
+ except Exception:
+ raise Exception