ankitpokhrel / ankitpokhrel/jira-cli

feat: Support bearer token authentication for self-hosted Jira Server

Aperta
#1,022 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
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.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.