Skip to content

Split Email and API Token into separate settings fields#12

Merged
haugjan merged 1 commit into
mainfrom
feature/separate-email-and-token-fields
May 10, 2026
Merged

Split Email and API Token into separate settings fields#12
haugjan merged 1 commit into
mainfrom
feature/separate-email-and-token-fields

Conversation

@haugjan

@haugjan haugjan commented May 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • New Email field in the settings panel; API Token field no longer requires the email: prefix.
  • Hyperlink under the Token field opens https://id.atlassian.com/manage-profile/security/api-tokens.
  • Backwards-compat: legacy email:token pasted into the Token field still works when Email is empty.
  • Bumps plugin.json to 1.2.0.

Auth-header construction extracted into AuthHeaderBuilder with unit tests covering all three modes (separate fields, legacy combined, token-only on-prem).

Test plan

  • Unit cases verified locally (Inline-compile because the local SDK only ships .NET 10 AppHost packs and dotnet test cannot satisfy the net9 apphost; CI with .NET 9 SDK runs AuthHeaderBuilderTest normally).
  • Live verified against https://confdg.atlassian.net/wiki/rest/api/search?cql=type=page&limit=1:
    • New mode (Email + Token) → HTTP 200
    • Legacy mode (email:token in Token field) → HTTP 200
    • Token-only (on-prem simulation on Cloud) → HTTP 401 (expected)
  • Release build of the main project: 0 warnings, 0 errors.

Adds an Email field alongside API Token in the settings panel, plus a
hyperlink to id.atlassian.com for creating a token. The auth-header
builder combines them as email:token for Cloud, or sends the token
alone for Server / Data Center.

For backwards compatibility, an existing email:token value pasted in
the API Token field continues to work when Email is empty. Bumps
plugin.json to 1.2.0.
@haugjan haugjan merged commit 387305e into main May 10, 2026
1 check passed
@haugjan haugjan deleted the feature/separate-email-and-token-fields branch May 10, 2026 16:40
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.

1 participant