verification_keys | Optional[List[str]] | JWT_VERIFICATION_KEY env var | List of keys for JWT verification. For RS256, use public keys. For HS256, use shared secrets. Each key is tried in order until one succeeds - useful for accepting tokens from multiple issuers. |
jwks_file | Optional[str] | JWT_JWKS_FILE env var | Path to a static JWKS (JSON Web Key Set) file. Keys are looked up by kid (key ID) from the JWT header. |
secret_key | Optional[str] | None | (Deprecated) Use verification_keys instead. |
algorithm | str | "RS256" | JWT algorithm (RS256, HS256, ES256, etc.) |
validate | bool | True | Whether to validate JWT tokens |
authorization | Optional[bool] | None | Enable RBAC scope checking |
token_source | TokenSource | TokenSource.HEADER | Where to extract JWT token from |
token_header_key | str | "Authorization" | Header key for Authorization |
cookie_name | str | "access_token" | Cookie name for JWT token |
scopes_claim | str | "scopes" | JWT claim name for scopes |
user_id_claim | str | "sub" | JWT claim name for user ID |
session_id_claim | str | "session_id" | JWT claim name for session ID |
audience_claim | str | "aud" | JWT claim name for audience/OS ID |
audience | Optional[Union[str, Iterable[str]]] | None | Expected audience claim to validate against the token’s audience claim. Defaults to the AgentOS ID. |
verify_audience | bool | False | Verify aud claim matches AgentOS ID |
dependencies_claims | Optional[List[str]] | None | Claims to extract for dependencies parameter |
session_state_claims | Optional[List[str]] | None | Claims to extract for session_state parameter |
scope_mappings | Optional[Dict[str, List[str]]] | None | Custom route-to-scope mappings (additive to defaults) |
excluded_route_paths | Optional[List[str]] | See below | Routes to skip JWT/RBAC checks |
admin_scope | Optional[str] | "agent_os:admin" | Scope that grants full admin access |