feat(yaiam): refresh and revoke a web sign-in's tokens
Web.Refresh trades the refresh token from an offline_access sign-in for the next access token, authenticating a confidential client with its secret (Client.Refresh only sends client_id). Web.Revoke ends the refresh and access token at sign-out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
560a1ead8a
commit
c2a5e3928a
3 files changed
+185
-1
No files matched your search
@@ -14,7 +14,7 @@ Today it holds the Atlassian clients that `yareco`, `yabaratla` and
|
||||
| `atlassian/jira` | Jira REST API client (Cloud v3 and Server/Data Center v2) |
|
||||
| `atlassian/confluence` | small Confluence REST API client (classic content API) |
|
||||
| `atlassian/internal/transport` | the HTTP machinery both share; not importable from outside |
|
||||
| `yaiam` | sign a command-line program in at yaiam (device flow, RFC 8628) and keep its tokens (YAIAM-710, 2026-11-09); sign a web application's users in (code flow with PKCE) and read users and groups from yaiam's admin API (2026-11-17); trade a user's token for one at another service, for an agent (token exchange, RFC 8693, 2026-11-21) |
|
||||
| `yaiam` | sign a command-line program in at yaiam (device flow, RFC 8628) and keep its tokens (YAIAM-710, 2026-11-09); sign a web application's users in (code flow with PKCE) and read users and groups from yaiam's admin API (2026-11-17); trade a user's token for one at another service, for an agent (token exchange, RFC 8693, 2026-11-21); refresh and revoke a web sign-in's tokens (2026-11-28) |
|
||||
|
||||
Standard library only, no third-party dependencies.
|
||||
|
||||
@@ -179,6 +179,11 @@ out, _ := web.LogoutURL(ctx, u.IDToken)
|
||||
is sent to the endpoints on the public origin; the server keeps
|
||||
`Issuer`. `AllowInsecure` (on `Client`) accepts plain http off
|
||||
loopback, for a test installation on a closed network only.
|
||||
- With `offline_access` in `Scopes` the sign-in's `Token` has a refresh
|
||||
token: `web.Refresh(ctx, tok)` gets the next access token (client
|
||||
secret in a Basic header for a confidential client; keep the result,
|
||||
its refresh token replaces the old one; a refused one is
|
||||
`ErrLoginRequired`), and `web.Revoke(ctx, tok)` ends both at sign-out.
|
||||
|
||||
`Admin` reads a tenant's users, groups and group members from yaiam's
|
||||
admin API with a service client's token (client credentials, cached
|
||||
|
||||
Reference in new issue
Block a user