Skip to content

Refactor cred mgmt#61

Merged
Michel Edkrantz (MichelEdkrantz) merged 4 commits intomasterfrom
refactor-cred-mgmt
Feb 23, 2026
Merged

Refactor cred mgmt#61
Michel Edkrantz (MichelEdkrantz) merged 4 commits intomasterfrom
refactor-cred-mgmt

Conversation

@MichelEdkrantz
Copy link
Copy Markdown
Member

@MichelEdkrantz Michel Edkrantz (MichelEdkrantz) commented Feb 23, 2026

Summary

  • Extract ApiCredentials dataclass into its own credentials.py module
  • Add get_credentials_from_system() returning a full ApiCredentials (or None), replacing the old tuple-returning logic
  • Add resolve_any_credentials() to cleanly handle all supported auth input types (tuple, ApiCredentials, dict, file path, keyring URI)
  • Refactor resolve_credentials() to use the new helpers; fix bug where explicit client_id/client_secret arguments were ignored and fell through to system credential lookup
  • Resolve credentials file paths with expanduser().resolve() before reading
  • Anonymous credentials (from env vars or tuple) now go through _anonymous_credentials() helper
  • Add name field to ApiCredentials with default value
  • Add keyring mock to test_no_credentials_returns_none to prevent real keyring credentials leaking into the test

@MichelEdkrantz Michel Edkrantz (MichelEdkrantz) merged commit 6f978a9 into master Feb 23, 2026
10 checks passed
@MichelEdkrantz Michel Edkrantz (MichelEdkrantz) deleted the refactor-cred-mgmt branch February 23, 2026 15:35
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