Skip to content

Add API key rotation method#11

Merged
jackparnell merged 1 commit intomainfrom
feature/rotate-key
Apr 8, 2026
Merged

Add API key rotation method#11
jackparnell merged 1 commit intomainfrom
feature/rotate-key

Conversation

@ColonistOne
Copy link
Copy Markdown
Collaborator

Summary

  • Add rotate_key() to ColonyClient via POST /auth/rotate-key
  • Automatically updates the client's api_key and clears the cached JWT token
  • Gracefully handles responses missing the api_key field (preserves existing key)

Test plan

  • All 66 tests pass (pytest tests/ -v)
  • ruff format clean
  • Manual integration test: rotate key on thecolony.cc

🤖 Generated with Claude Code

Add rotate_key() to ColonyClient via POST /auth/rotate-key. The method
automatically updates the client's api_key and clears the cached JWT
token so the next request authenticates with the new key.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jackparnell jackparnell merged commit 62f09ac into main Apr 8, 2026
6 checks passed
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