Files
dingtalk-workspace-cli/internal/auth
zhengyubai 660c908585 fix(auth): classify refresh failures and keep transient ones recoverable
Restored from the pre-rewrite branch head 342d44efe (backed up as
backup/event-token-lazy-resolution-pre-rewrite); the auth-layer changes
apply verbatim on the rebased branch.

- Add ClassifyRefreshFailure with structured HTTPStatusError so refresh
  failures split into transient (network, timeout, 408/429/5xx) and
  terminal (400/401/403) classes; unknown errors stay fatal.
- GetTokenSnapshot no longer marks a profile expired on transient
  refresh failures, so long-running sources can retry after backoff.
- postJSON returns HTTPStatusError keeping the response body out of the
  error string; the OAuth callback page HTML-escapes the sanitized
  exchange error instead of echoing raw server output.
- isInvalidGrantError also matches the preserved response body.
2026-07-20 18:09:15 +08:00
..
2026-07-15 11:41:30 +08:00
2026-07-15 11:41:30 +08:00
2026-07-15 11:41:30 +08:00
2026-03-27 17:55:57 +08:00
2026-03-27 17:55:57 +08:00
2026-06-25 11:10:25 +08:00
2026-07-15 11:41:30 +08:00
2026-03-27 17:55:57 +08:00
2026-03-27 17:55:57 +08:00
2026-07-15 11:41:30 +08:00
2026-07-15 11:41:30 +08:00
2026-03-27 17:55:57 +08:00
2026-07-15 11:41:30 +08:00