Skip to content

Non interactive cmd#11

Merged
HanXHX merged 13 commits intomasterfrom
non_interactive_cmd
Mar 1, 2026
Merged

Non interactive cmd#11
HanXHX merged 13 commits intomasterfrom
non_interactive_cmd

Conversation

@HanXHX
Copy link
Copy Markdown
Contributor

@HanXHX HanXHX commented Feb 28, 2026

Prepare non interactive usage (CI, scripts... etc).

Copilot AI review requested due to automatic review settings February 28, 2026 18:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds non-interactive / CI-friendly authentication and key handling to the CLI by supporting offline refresh tokens via environment variables, plus optional server-side session revocation on logout.

Changes:

  • Extend OIDC discovery/config to include end_session_endpoint and add a revocation call on auth logout.
  • Add offline token flow: retyc auth login --offline prints a refresh token for CI, and RETYC_TOKEN enables non-disk auth in GetValidToken.
  • Add RETYC_KEY_PASSPHRASE to avoid interactive passphrase prompts and document CI/CD usage in the README.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
internal/config/config.go Adds EndSessionURL to OIDC config model.
internal/auth/oidc.go Implements Revoke and supports RETYC_TOKEN env-based token refresh path.
internal/api/login.go Parses and wires end_session_endpoint from OIDC discovery into config.
cmd/transfer.go Centralizes key passphrase reading with RETYC_KEY_PASSPHRASE fallback to interactive prompt.
cmd/auth.go Adds --offline login mode, logout revocation attempt, and offline-token detection helper.
README.md Documents offline login and CI/CD environment variable usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/auth.go Outdated
Comment thread README.md Outdated
Comment thread internal/auth/oidc.go Outdated
Comment thread cmd/auth.go Outdated
Comment thread cmd/auth.go Outdated
Comment thread cmd/auth.go Outdated
Comment thread cmd/transfer.go
@HanXHX HanXHX force-pushed the non_interactive_cmd branch from f40ae04 to 564ca78 Compare March 1, 2026 08:34
@HanXHX
Copy link
Copy Markdown
Contributor Author

HanXHX commented Mar 1, 2026

@copilot code review[agent] final review

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 1, 2026

@HanXHX I've opened a new pull request, #12, to work on those changes. Once the pull request is ready, I'll request review from you.

Non-interactive / CI-friendly auth and key passphrase handling
@HanXHX HanXHX merged commit d693793 into master Mar 1, 2026
2 checks passed
@HanXHX HanXHX deleted the non_interactive_cmd branch March 1, 2026 08:48
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.

3 participants