ankitpokhrel / ankitpokhrel/jira-cli
feat: Support bearer token authentication for self-hosted Jira Server
- Lingua principale
- Go
- Stelle
- 6k
- Fork
- 413
- Merge medio
- 2g 3h
- PR unite (30g)
- 1
Descrizione
## Problem
Self-hosted Jira Server instances (Jira Data Center/Server) may only accept Bearer token authentication, rejecting Basic auth. When `auth-type: bearer` is set in the config file, jira-cli still sends Basic auth because:
1. Config file uses `auth-type` (hyphen) but code reads `auth_type` (underscore) via viper
2. Viper does not auto-convert between hyphens and underscores
3. Empty auth type defaults to Basic auth
## Current Behavior
- `jira me` works (doesn't make API calls, just reads config)
- All other commands return 403 Forbidden
- curl with Bearer token works fine
## Expected Behavior
`auth-type: bearer` should result in `Authorization: Bearer ` header for all API calls.
## Related PR
Closes #1021
## Environment
- jira-cli version: v1.7.1
- Jira Server: self-hosted (Jira Data Center)
- Auth: Personal Access Token (PAT)
- OS: Linux
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.