Skip to content

feat(oidc): list the resources a provider client may get access tokens for - #533

Merged
Bccorb merged 6 commits into
mainfrom
feat/oidc-client-resources
Oct 31, 2026
Merged

Bccorb merged 6 commits into
mainfrom
feat/oidc-client-resources

Conversation

@Bccorb

@Bccorb Bccorb commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Adds GET /oidc/clients/:id/resources to the service-token /oidc/* routes. Base is #534; merge #534 first.

Why

For #509 the OpenID Provider service issues RFC 9068 JWT access tokens for a named API (RFC 8707). The admin side shipped in #526 and /oidc/sign already checks a token's aud and scope against the client's links, but the edge had no way to learn which resources a client may ask for, with which scopes and lifetime. #534 (#516) also needs the edge to offer the built-in <oidc_issuer>/seamless resource with notices:send.

What

  • getOidcClientResources(clientId) returns each resource the client may use: the built-in notices resource when the application has noticesEnabled (moved here from feat(oidc): send account notices on a registered application's behalf #534's getOidcClientResourceScopes), then each linked resource with the link's scopes narrowed to what the resource declares, and accessTokenTtlSeconds. A stored resource using the built-in identifier is still ignored. getOidcClientResourceScopes (used by /oidc/sign) is now a map over the same list, so the edge and the signer cannot disagree.
  • The route answers 404 for a client that does not exist or is not active, like /oidc/clients/:id.
  • @seamless-auth/types 0.34.0-next.2. openapi.json and src/generated/api.ts regenerated. Minor changeset.

No migration. The route is additive, and OIDC_EDGE_CONTRACT_VERSION stays 1.

Checks

  • npm run typecheck, npm run lint, npm run format:check, npm run check:changeset-bump: clean
  • npm run coverage: 2665 passed; lines 99.21, branches 95.69, functions 99.35
  • npm run build: ok
  • Real-stack e2e with the edge stack (seamless-auth-oidc-provider#16 to [Feature]: Step-up authentication #21): resource tokens, introspection, refresh, client credentials, and an account notice sent on a client credentials token for <issuer>/seamless and delivered by email.

Part of #509.

@Bccorb
Bccorb changed the base branch from main to feat/application-account-notices October 31, 2026 03:51
@Bccorb
Bccorb added this pull request to stack #535 October 31, 2026 04:06
Base automatically changed from feat/application-account-notices to main October 31, 2026 04:07
@Bccorb
Bccorb marked this pull request as ready for review October 31, 2026 04:07
…urces

# Conflicts:
#	src/services/oidcClientRegistry.ts
#	tests/unit/services/oidcClientRegistry.spec.ts
@Bccorb
Bccorb merged commit 471d3d7 into main Oct 31, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant