Skip to content

Added support for OAuth SSO and profiles for account switching#4

Merged
burgaard merged 2 commits into
mainfrom
add-oauth-support
Mar 26, 2026
Merged

Added support for OAuth SSO and profiles for account switching#4
burgaard merged 2 commits into
mainfrom
add-oauth-support

Conversation

@burgaard
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 26, 2026 05:42
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

Adds OAuth/bearer-token + SSO profile authentication to the Go SDK and updates the OpenAPI spec to support bearer auth plus an X-Account-Id header for account switching.

Changes:

  • Add credential resolution chain (API key, bearer token, bearer provider, env var, SSO profile + cached token refresh) and apply auth per request.
  • Extend OpenAPI spec with BearerAuth, ApiKeyAuth, global security, and reusable X-Account-Id header parameter.
  • Update docs and tests for new authentication modes and multi-account header behavior.

Reviewed changes

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

Show a summary per file
File Description
openapi/seclai.openapi.json Adds X-Account-Id parameter, new auth-related schemas, and global security schemes for API key + bearer auth.
doc.go Updates package-level auth documentation and examples for new credential chain.
client.go Reworks client auth handling to use a resolved auth state and apply headers per request (generated + manual).
auth.go Introduces SSO profile parsing, token cache IO, refresh flow, and credential chain resolution.
client_test.go Adds tests for missing credentials, mutual exclusion, bearer auth, header injection, INI parsing, and token validity logic.
README.md Documents new auth options, credential chain, and SSO setup via CLI.

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

Comment thread doc.go
Comment thread client.go Outdated
Comment thread auth.go
Comment thread auth.go
Comment thread openapi/seclai.openapi.json
@burgaard burgaard merged commit a6a378f into main Mar 26, 2026
1 check passed
@burgaard burgaard deleted the add-oauth-support branch May 22, 2026 19:36
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.

2 participants