Parent
Part of #17.
What to build
The definitive chain: after wso2 login, a reference module command receives a real, issuer-minted access token through the authentication broker, narrowed to exactly the scopes it requested and bound to its product's audience — proven by the issuer's introspection endpoint and by the bearer token the status service records receiving.
The broker resolves a token source per identity kind behind an internal seam (the development fixture source remains, restricted to the reference namespace). The oauth-browser source derives access by scoped refresh: the refresh grant carries exactly the module's requested scopes, the shell verifies the effective scopes equal the request and the token's audience covers the product's audience, and any shortfall — narrowing ignored, rejected, or wrong audience — is a typed narrowing-unavailable refusal, never a broader grant. Rotated refresh tokens are persisted under the session lock before the grant is returned.
New broker policy refusals: product not configured on the identity (or mismatched audience/scopes against the product entry), organization differing from the identity's home tenant (organization switch unsupported), stored session missing (login required) or minted by a different issuer (session issuer mismatch), and kind not implemented for device/PAT.
Detailed steps: implementation plan docs/superpowers/plans/2026-08-05-login-first-slice.md, Tasks 8–9 and 11.
Acceptance criteria
Blocked by
Parent
Part of #17.
What to build
The definitive chain: after
wso2 login, a reference module command receives a real, issuer-minted access token through the authentication broker, narrowed to exactly the scopes it requested and bound to its product's audience — proven by the issuer's introspection endpoint and by the bearer token the status service records receiving.The broker resolves a token source per identity kind behind an internal seam (the development fixture source remains, restricted to the reference namespace). The oauth-browser source derives access by scoped refresh: the refresh grant carries exactly the module's requested scopes, the shell verifies the effective scopes equal the request and the token's audience covers the product's audience, and any shortfall — narrowing ignored, rejected, or wrong audience — is a typed narrowing-unavailable refusal, never a broader grant. Rotated refresh tokens are persisted under the session lock before the grant is returned.
New broker policy refusals: product not configured on the identity (or mismatched audience/scopes against the product entry), organization differing from the identity's home tenant (organization switch unsupported), stored session missing (login required) or minted by a different issuer (session issuer mismatch), and kind not implemented for device/PAT.
Detailed steps: implementation plan
docs/superpowers/plans/2026-08-05-login-first-slice.md, Tasks 8–9 and 11.Acceptance criteria
wso2 reference statusyields a token the fake issuer's introspection confirms active, with exactly the requested scope and the product audience — asserted from the status service's recorded bearer token, never by printing itauth.narrowing_unavailablewith no grantauth.login_requirednamingwso2 login; a context targeting a non-home organization refusesauth.organization_switch_unsupportedgo test ./... -racepassesBlocked by