Skip to content

add --header flag to src auth token to print auth header#1276

Merged
burmudar merged 2 commits intomainfrom
wb/auth-token-header-flag
Mar 17, 2026
Merged

add --header flag to src auth token to print auth header#1276
burmudar merged 2 commits intomainfrom
wb/auth-token-header-flag

Conversation

@burmudar
Copy link
Contributor

  • for access token print Authorization: token <token>
  • for oauth token print Authorization: Bearer <token>

Closes CPL-275

Test plan

❯ export SRC_ENDPOINT=https://sourcegraph.sourcegraph.com; go run ./cmd/src/... auth token --header
Authorization: Bearer sgo_at_DEADBEEF

src-cli on  wb/auth-token-header-flag [$!?] via 🐹 v1.25.5
❯ export SRC_ENDPOINT=https://sourcegraph.sourcegraph.com; export SRC_ACCESS_TOKEN='hello-reviewer'; go run ./cmd/src/... auth token --header
Authorization: token hello-reviewer

- for access token print `Authorization: token <token>`
- for oauth token print `Authorization: Bearer <token>`
@burmudar burmudar requested review from a team and eseliger March 17, 2026 14:59
@burmudar burmudar self-assigned this Mar 17, 2026
@burmudar burmudar enabled auto-merge (squash) March 17, 2026 14:59
@burmudar burmudar merged commit 21fa132 into main Mar 17, 2026
9 checks passed
@burmudar burmudar deleted the wb/auth-token-header-flag branch March 17, 2026 15:06
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