1.8 KiB
1.8 KiB
Why
Planka now supports user-level API key authentication. The current pcli authentication uses session-based JWT tokens (via Authorization: Bearer <token>) with an optional OIDC httpOnlyToken cookie path. API keys are simpler, long-lived, and eliminate the need for multiple auth modes. Replacing the current auth with API key auth simplifies both the codebase and the user experience.
What Changes
- BREAKING: Replace
Authorization: Bearer <token>header withx-api-key: <key>header on all API requests - BREAKING: Rename environment variable
PLANKA_TOKEN→PLANKA_API_KEY - BREAKING: Rename CLI flag
--token→--api-key - Remove
PLANKA_HTTP_TOKENenvironment variable support - Remove
--http-tokenCLI flag - Remove
HttpOnlyTokenfield from theClientstruct and all OIDC cookie logic - Simplify
NewClientconstructor to accept only base URL, API key, and logger
Capabilities
New Capabilities
(none)
Modified Capabilities
api-client: Authentication header changes fromAuthorization: Bearertox-api-key. Client struct dropsHttpOnlyTokenfield.NewClientsignature simplifies. OIDC cookie logic removed.cli-commands: Root command global flags change:--token→--api-key,--http-tokenremoved. Environment variable changes:PLANKA_TOKEN→PLANKA_API_KEY,PLANKA_HTTP_TOKENremoved.
Impact
- Code:
client/client.go(struct, constructor,Do()method),cmd/root.go(flags, env vars, client init) - Users: All existing users must update their environment variables and any scripts from
PLANKA_TOKENtoPLANKA_API_KEYand generate an API key in Planka - Dependencies: No dependency changes
- API: No Planka API endpoint changes — only the authentication mechanism used by pcli changes