Repository navigation
Closed
Labels
documentationImprovements or additions to documentation
Description
Summary
The TypeScript ADK (@inference-gateway/adk) now ships an OIDC/OAuth2 Bearer-token authentication middleware mirroring the Go ADK's server/middlewares/auth.go. The feature is disabled by default and opted into via AUTH_ENABLE=true. It needs documentation in the docs site so consumers can discover and configure it.
The implementation was tracked in:
- Issue: [FEATURE] feat: implement OIDC and OAuth2 authentication middleware typescript-adk#35
- PR: feat: implement OIDC and OAuth2 authentication middleware typescript-adk#90 (merged)
What ships
- New module
src/auth/exposing:loadAuthConfigFromEnv()- readsAUTH_ENABLE,AUTH_ISSUER_URL,AUTH_CLIENT_ID,AUTH_CLIENT_SECRET.createAuthenticator()- async factory that performs OIDC discovery at boot, builds a JWKS verifier with TTL caching andkid-miss refresh, and returns a Hono middleware.OIDCAuthenticator/NoopAuthenticator- the enabled and zero-overhead disabled paths.decorateAgentCardWithAuth()- advertises the OpenID Connect security scheme on the agent card when auth is on.
A2AServerConfig.authenticator?mounts the middleware on the JSON-RPC endpoint only./.well-known/agent-card.jsonand/healthstay public.A2AServerBuilder.withAuthenticator()/A2AServerBuilder.withAuthConfig()- the latter also decorates the card atbuild()time.- Rejected requests: HTTP 401 + JSON-RPC
-32001+WWW-Authenticate: Bearer. Successful verification attachesAuthContexttoc.get('auth'). - Built on
jose@^6. Verified against a real Keycloak via a gated integration test (RUN_KEYCLOAK_INTEGRATION=1).
Pages to touch
typescript-adk.md- add an "Authentication" section under the "What ships today" table covering the config env vars, the builder wiring, the request lifecycle (claims viac.get('auth')), card advertisement, and the rejection contract.authentication.md- cross-link the TypeScript ADK section. The Go gateway page currently usesAUTH_OIDC_ISSUER/AUTH_OIDC_CLIENT_ID/AUTH_OIDC_CLIENT_SECRET; the TypeScript ADK usesAUTH_ISSUER_URL/AUTH_CLIENT_ID/AUTH_CLIENT_SECRET. Document both variants explicitly so readers don't confuse them.
Code samples to add
- Minimal opt-in via
AUTH_ENABLE=trueplus issuer URL. A2AServerBuilder.withAuthConfig()example showing card advertisement.- Custom
NoopAuthenticatoropt-out path. - Snippet showing how to read claims off
c.get('auth')inside a handler.
Acceptance Criteria
-
typescript-adk.mdhas an "Authentication" section covering config env vars, builder wiring, request lifecycle, card decoration, and the 401 / JSON-RPC-32001rejection contract. -
authentication.mdcross-links the TypeScript ADK auth section and clarifies the env-var name difference between the Go gateway and the TypeScript ADK. - At least one runnable code sample per surface listed under "Code samples to add."
- Page metadata (
description) is updated so the new content is discoverable in search.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentation
Type
Projects
- StatusShow more project fieldsDone
Activity
edenreich commentedon May 27, 2026
@claude /maintainer Can you document it?
claude commentedon May 27, 2026
Claude finished @edenreich's task in 6m 48s —— View job •
claude/issue-79-20260527-2120• Create PR ➔Documentation task: OIDC/OAuth2 in TypeScript ADK
typescript-adk.mdandauthentication.mdfor structure/voicesrc/auth/config.ts,authenticator.ts,oidc.ts,card-decoration.ts, server-builder/server) for env var names, builder API, request lifecycle, rejection reasonstypescript-adk.md(config, builder wiring, lifecycle, card decoration, 401/-32001 contract) + add row to "What ships today" table + bump pagedescriptionwithAuthConfig, reading claims viac.get('auth'),NoopAuthenticatoropt-out,decorateAgentCardWithAuthwith custom scheme nameauthentication.md(Go gateway page) and clarify Go vs TypeScript env-var name differences via a side-by-side mapping table; bump pagedescriptionnpm run lint:mdcleannpm run format:checkclean (rannpm run formatto autofix one prettier wrap)npm run buildsucceeds (no Vue compiler complaints from the${...}/<>patterns in the new copy)claude/issue-79-20260527-2120(commit2afa720)Summary of changes
typescript-adk.md## Authenticationh2 (placed between## Agent builderand## Parity with the Go ADK) covering: intro +jose@^6reference, env-var config table, minimal opt-in code sample,withAuthenticator()/withAuthConfig()builder wiring with combined-call sample, public vs. protected endpoint table,c.get('auth')claims-reading sample withAuthContextshape, full HTTP 401 + JSON-RPC-32001+WWW-Authenticate: Bearerrejection envelope plusreasoncode matrix, agent-card decoration withdecorateAgentCardWithAuth()(includingschemeNameoverride sample), andNoopAuthenticatoropt-out sample.createAuthenticator/OIDCAuthenticator.descriptionfrontmatter now mentions OIDC / OAuth2 /AUTH_ENABLE/AUTH_ISSUER_URL/ JSON-RPC-32001so the new content is discoverable in search.server/middlewares/auth.go, calling out the env-var name divergence explicitly.authentication.md(Go gateway page)Clarified that the page documents the Go gateway, and that TypeScript ADK consumers should see
typescript-adk#authentication.New "Env-var naming: Go gateway vs. TypeScript ADK" subsection with a side-by-side mapping table making the
AUTH_OIDC_*vs.AUTH_*divergence explicit, plus a note on what's behaviour-identical (JWKS verification,401 + WWW-Authenticate: Bearer) vs. ADK-specific (JSON-RPC-32001, public/.well-known/agent-card.json).New bullet under "Next Steps" pointing back at the TypeScript ADK auth section.
Page
descriptionfrontmatter expanded to include both env-var families.branch:
claude/issue-79-20260527-2120docs: document OIDC/OAuth2 authentication middleware in the TypeScrip…
chore(release): 🔖 0.6.42 [skip ci]