Skip to content

feat: KasAuth session flags (--otp, --session-lifetime, --session-update-lifetime)#33

Merged
chmmou merged 3 commits into
mainfrom
feature/otp-flag
May 3, 2026
Merged

feat: KasAuth session flags (--otp, --session-lifetime, --session-update-lifetime)#33
chmmou merged 3 commits into
mainfrom
feature/otp-flag

Conversation

@chmmou

@chmmou chmmou commented May 3, 2026

Copy link
Copy Markdown
Owner

Summary

Adds three persistent root-command flags exposing the optional KasAuth bootstrap parameters:

  • --otpsession_2fa
  • --session-lifetimesession_lifetime (1..30000 seconds, range-checked client-side)
  • --session-update-lifetimesession_update_lifetime (Y/N)

All three flow through BuildAPIClient into auth.Options so auth.SessionTokenSource forwards them on the credential-token request. They are KasAuth-only (the KAS docs do not cover them on direct kas_auth_type=plain calls), so combining any of them with auth_type=plain is rejected up front with a user-error exit code that points to the correct strategy.

The --auth-type and per-flag help texts spell out the KAS-protocol vs. CLI-config-strategy distinction so the duplicated word "plain" no longer misleads.

@chmmou chmmou changed the title feat: --otp flag for KasAuth 2FA login feat: KasAuth session flags (--otp, --session-lifetime, --session-update-lifetime) May 3, 2026
@chmmou chmmou merged commit 20fe94d into main May 3, 2026
1 check passed
@chmmou chmmou deleted the feature/otp-flag branch May 3, 2026 15:19
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