Exchanger trades a user's access token, as a confidential client with
its secret in a Basic header, for one at another yaiam client (yaiam
ADR-0045): Exchange(ctx, subject, audience, scopes...) and Revoke for
the end of an agent's job. Only access tokens are asked for and taken.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A callback that belongs to no sign-in of this browser is now
ErrSignInState without contacting the provider (before, an unreachable
provider turned it into a discovery error).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Web.PublicIssuer sends the browser to the provider's endpoints on a
public origin while the server keeps Issuer (container networks); the
callback's iss may name either. Client.AllowInsecure accepts plain http
off loopback for test installations on a closed network. email_verified
counts only as the JSON boolean true; a string no longer fails the
sign-in. First consumer: yaemp.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Web asks for the scope attributes; SignedIn.Attributes carries the
attributes yaiam released to the application (from UserInfo), and
Admin's User carries a user's attributes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Web signs the users of a web application in with the code flow and
PKCE: state, nonce and verifier in a short-lived __Host- cookie, the ID
token checked per OIDC Core 3.1.3.7, profile, groups and roles from
UserInfo, and the RP-initiated logout URL. Admin reads users, groups
and group members from yaiam's admin API with a client credentials
token. Toolchain go1.27.4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A shared client for programs that sign in at yaiam (or any OIDC
provider): device flow (RFC 8628), refresh with rotation, revocation
(RFC 7009), UserInfo and a 0600 file store. Standard library only;
https only (http on loopback), exact issuer match, no redirects,
answers capped at 1 MiB, tokens never in errors or fmt output.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>