Authorization header, verifies the RS256 token against AgentOnboard’s public JWKS, calls your account resolver, and maps failures to HTTP 401, 403, or 500 responses.
Choose your framework
Next.js
Express
Hono
FastAPI
Django
Flask
Shared adapter guarantees
All@agentonboard/sdk framework bindings enforce the same rules:
Key properties across all bindings:
- Header-only extraction: A
Bearerprefix is stripped case-insensitively. - Hardcoded Domain:
audienceandissuercome from your server code, never from the incoming request. - Minimal resolver input:
resolveAccountreceives{ email }alone. - No account caching:
resolveAccountruns once per request so deleted or suspended users are blocked immediately. - Consistent HTTP statuses: Token verification failures return
401.ACCOUNT_REQUIREDreturns403. Unhandled resolver errors return500.
Custom failure responses (onFailure)
In TypeScript bindings (next, express, hono), pass onFailure to customize the error response body or headers. It receives { code, error } and must return a standard Web Response:
Supplying custom or offline JWKS keys
For unit tests, air-gapped environments, or customfetchJwks proxies, call verifyAgentAccount from @agentonboard/sdk directly: