auth: factor shared per-context manager + reauth-error mapping

main

Commit

toothbrush3mo ago

NewRefreshingLoginProvider and NewRefreshingResourceProvider shared ~30 near-identical lines (validation, tokenmanager.New, the reauth error switch). Extract newContextTokenManager + contextReauthError; the two providers now differ only in Refresh() vs Token(req) and the residual error wording.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: 6f9136693ab0

Checkpoints

Auth Refactoring and Discovery Caching

Claude CodeOpus 4.8[1m]
View session
Checkpoint 1