Skip to content

Me endpoint sso updates#5

Merged
burgaard merged 8 commits into
mainfrom
me-endpoint-sso-updates
Mar 27, 2026
Merged

Me endpoint sso updates#5
burgaard merged 8 commits into
mainfrom
me-endpoint-sso-updates

Conversation

@burgaard

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 27, 2026 06:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds SSO + bearer-token authentication support (including dynamic token providers) and introduces the new /me identity endpoint + X-Account-Id scoping in the OpenAPI spec, updating the Python SDK’s credential resolution and docs accordingly.

Changes:

  • Introduce seclai.auth with an auth-mode state machine, SSO config/cache handling, and token refresh utilities.
  • Update Seclai / AsyncSeclai to resolve credentials via a chain (api_key → bearer → env → SSO) and apply dynamic auth per-request (including for typed/generated-client methods).
  • Expand tests and documentation to cover bearer auth modes, SSO fallback behavior, and X-Account-Id behavior.

Reviewed changes

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

Show a summary per file
File Description
seclai/auth.py New module implementing credential chain + SSO cache/refresh + per-request header resolution.
seclai/seclai.py Client options refactor to AuthState, dynamic auth header merging, and typed-method client refresh helpers.
tests/test_auth_and_headers.py Adds coverage for bearer token auth (static/provider), typed-method auth propagation, and X-Account-Id rules.
seclai/__init__.py Re-exports SSO defaults and SSO cache/profile dataclasses as public API.
openapi/seclai.openapi.json Adds /me, X-Account-Id parameter, and security scheme updates.
README.md Documents credential chain, bearer usage, and SSO defaults/configuration.
.github/copilot-instructions.md Adds repo-specific CI and architecture notes (including auth-mode rules).

Comment thread seclai/seclai.py
Comment thread seclai/seclai.py
Comment thread seclai/auth.py
Comment thread openapi/seclai.openapi.json
Copilot AI review requested due to automatic review settings March 27, 2026 21:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread seclai/auth.py
Comment thread openapi/seclai.openapi.json
Comment thread seclai/seclai.py
Comment thread tests/test_auth_and_headers.py Outdated
Comment thread tests/test_auth_and_headers.py Outdated
Comment thread seclai/auth.py
@burgaard burgaard merged commit 02698ac into main Mar 27, 2026
1 check passed
@burgaard burgaard deleted the me-endpoint-sso-updates branch March 27, 2026 22:27
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