Authentication Flow
1-Click AI Implementation Prompt
Copy and paste this prompt directly into Cursor (Composer / Agent), Claude Code, or GitHub Copilot to auto-implement the auth middleware into your codebase:Manual Copy-Paste Middlewares
If you prefer to wire up the middleware manually, choose your backend runtime below.- Node.js (Express)
- Python (FastAPI)
- Go (Chi / net/http)
Install dependencies:Middleware implementation:
Token Metadata & Claims
Karada access tokens are standard OpenID Connect compatible RS256 signed JWTs with the following claims:sub: The unique Karada user identifier (UUID).email: Verified email address of the authenticated end-user.aud: Client ID associated with the deployment.iss: Authoritative issuer URL (https://karada.ai).scope: Granted OAuth scopes.
RFC Discovery Endpoints
Karada publishes standard discovery documents for zero-config client integration:- OAuth 2.1 Server Metadata (RFC 8414):
https://api.karada.ai/.well-known/oauth-authorization-server - JWKS Key Discovery (RFC 7517):
https://api.karada.ai/.well-known/jwks.json - Protected Resource Metadata (RFC 9728): Exposed automatically on each generated Go MCP server at
/.well-known/oauth-protected-resource