Skip to content

fix(client): honor refresh during initial connect#233

Open
YuMo12268 wants to merge 1 commit into
stack-rs:auth-enhancementfrom
YuMo12268:fix-refresh-on-connect
Open

fix(client): honor refresh during initial connect#233
YuMo12268 wants to merge 1 commit into
stack-rs:auth-enhancementfrom
YuMo12268:fix-refresh-on-connect

Conversation

@YuMo12268

Copy link
Copy Markdown

Summary

  • Honor the Client's --refresh option during the initial credential connection.
  • Refresh a valid cached credential directly instead of authenticating it first and refreshing it afterward.
  • When the cached credential is unavailable or rejected, preserve the existing login fallback while requesting a refreshed credential with /login(refresh=true).
  • Preserve the existing Client and Worker behavior when refresh is not requested.

Validation

  • cargo fmt --all
  • cargo clippy --workspace
  • cargo build
  • cargo doc
  • Manually verified with a mock Coordinator that:
    • a valid cached credential with --refresh sends exactly one /refresh request, without /auth or /login;
    • a missing cached credential with --refresh sends one /login request with refresh=true;
    • a rejected cached credential falls back from /refresh to /login with refresh=true;
    • without --refresh, the existing /auth flow remains unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant