Files
pad/internal/cli
David Barkhausen 1a041b33ff feat(cli): pad token rotate — new secret in place, old one dies with the write (#1237 follow-up) (#1330)
The rotate endpoint (POST /auth/tokens/{id}/rotate) existed server-side
with no CLI in front of it; the #1237 review asked for it as its own PR.

- exact id only, same discipline as revoke: a typo is the server's 404
  surfaced, never a wrong token rotated (which kills a live secret
  somewhere)
- the new secret prints exactly once (count-pinned) with the store-it-now
  notice, and the output says plainly that the old secret already stopped
  working — RotateAPIToken replaces the hash in place, no grace window,
  so the wording must not imply one
- --expires-in <days> posts a new expiry (server-capped by max lifetime);
  without it no expires_in is posted and the original expiry is preserved
  (test-pinned both ways)
- README documents rotate beside create/list/revoke, including that
  rotate shares create's session_required gate (#1267)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-11 18:05:46 -04:00
..
2026-03-26 01:52:36 +00:00
2026-03-26 01:52:36 +00:00
2026-03-26 01:52:36 +00:00