ankitpokhrel / ankitpokhrel/jira-cli
feat: Support bearer token authentication for self-hosted Jira Server
- Langage dominant
- Go
- Étoiles
- 6k
- Forks
- 413
- Merge moyen
- 2 j 3 h
- PR mergées (30 j)
- 1
Description
## 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
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.