Skip to content

refactor: enhance validation for authenticating with console#1235

Merged
rsdmike merged 2 commits intonextfrom
consoleAuth
Apr 2, 2026
Merged

refactor: enhance validation for authenticating with console#1235
rsdmike merged 2 commits intonextfrom
consoleAuth

Conversation

@rsdmike
Copy link
Copy Markdown
Member

@rsdmike rsdmike commented Mar 31, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 31, 2026 17:29
Copy link
Copy Markdown

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

This PR refactors the shared server authentication flag handling to improve CLI validation around token-exchange authentication (Console auth), and adds unit tests to lock in the expected behavior.

Changes:

  • Updates ServerAuthFlags.AuthEndpoint flag metadata (help text, adds env var support, removes implicit default) and clarifies struct docs.
  • Adds ServerAuthFlags.Validate() (Kong validation) to enforce credential presence when --auth-endpoint is provided.
  • Adds unit tests covering Validate, ValidateRequired, and ApplyToRequest.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
internal/commands/auth.go Adds Kong validation for auth-endpoint usage and updates auth-endpoint flag metadata/documentation.
internal/commands/auth_test.go Introduces tests to validate auth flag behavior and request header application.

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

@rsdmike rsdmike force-pushed the consoleAuth branch 2 times, most recently from 545f5d6 to e1ebdf8 Compare March 31, 2026 17:39
@rsdmike rsdmike enabled auto-merge (rebase) April 2, 2026 18:35
auto-merge was automatically disabled April 2, 2026 18:38

Rebase failed

@rsdmike rsdmike merged commit 9ed9d5e into next Apr 2, 2026
13 checks passed
@rsdmike rsdmike deleted the consoleAuth branch April 2, 2026 18:46
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