The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
docs token auth
Ishaan Jafff13be1416f25
diff --git a/docs/my-website/docs/proxy/token_auth.md b/docs/my-website/docs/proxy/token_auth.mdindex c6d280cb822..04bf5faec59 100644--- a/docs/my-website/docs/proxy/token_auth.md+++ b/docs/my-website/docs/proxy/token_auth.md@@ -102,7 +102,9 @@ curl --location 'http://0.0.0.0:4000/v1/chat/completions' \</TabItem></Tabs>-## Advanced - Set Accepted JWT Scope Names+## Advanced++### Set Accepted JWT Scope NamesChange the string in JWT 'scopes', that litellm evaluates to see if a user has admin access.@@ -114,7 +116,7 @@ general_settings:admin_jwt_scope: "litellm-proxy-admin"```-## Tracking End-Users / Internal Users / Team / Org+### Tracking End-Users / Internal Users / Team / OrgSet the field in the jwt token, which corresponds to a litellm user / team / org.@@ -156,7 +158,7 @@ scope: ["litellm-proxy-admin",...]scope: "litellm-proxy-admin ..."```-## Control model access with Teams+### Control model access with Teams1. Specify the JWT field that contains the team ids, that the user belongs to.@@ -207,11 +209,11 @@ OIDC Auth for API: [**See Walkthrough**](https://www.loom.com/share/00fe2deab59a- If all checks pass, allow the request-## Advanced - Custom Validate+### Custom JWT ValidateValidate a JWT Token using custom logic, if you need an extra way to verify if tokens are valid for LiteLLM Proxy.-### 1. Setup custom validate function+#### 1. Setup custom validate function```pythonfrom typing import Literal@@ -230,7 +232,7 @@ def my_custom_validate(token: str) -> Literal[True]:return True```-### 2. Setup config.yaml+#### 2. Setup config.yaml```yamlgeneral_settings:@@ -243,7 +245,7 @@ general_settings:custom_validate: custom_validate.my_custom_validate # 👈 custom validate function```-### 3. Test the flow+#### 3. Test the flow**Expected JWT**@@ -265,7 +267,7 @@ general_settings:-## Advanced - Allowed Routes+### Allowed RoutesConfigure which routes a JWT can access via the config.@@ -297,7 +299,7 @@ general_settings:team_allowed_routes: ["/v1/chat/completions"] # 👈 Set accepted routes```-## Advanced - Caching Public Keys+### Caching Public KeysControl how long public keys are cached for (in seconds).@@ -311,7 +313,7 @@ general_settings:public_key_ttl: 600 # 👈 KEY CHANGE```-## Advanced - Custom JWT Field+### Custom JWT FieldSet a custom field in which the team_id exists. By default, the 'client_id' field is checked.@@ -330,7 +332,7 @@ general_settings:-## Advanced - Block Teams+### Block TeamsTo block all requests for a certain team id, use `/team/block`@@ -357,7 +359,7 @@ curl --location 'http://0.0.0.0:4000/team/unblock' \```-## Advanced - Upsert Users + Allowed Email Domains+### Upsert Users + Allowed Email DomainsAllow users who belong to a specific email domain, automatic access to the proxy.