Commit 4aa9f2e
committed
feat: add developer command to copy raw JWT to clipboard
New command `artemis.showJwtToken` ("Artemis: Show JWT Token
(Developer)") copies the currently active JWT to the clipboard for
curl/Postman-based server testing.
Scope:
- Hidden from the Command Palette unless `artemis.developerMode`
is enabled (via `when: config.artemis.developerMode` clause).
- Additionally gated at runtime so direct invocation via
`vscode.commands.executeCommand` also respects the setting.
- Works in both auth modes: Desktop (Cookie) and Theia (Bearer).
The `jwt=` cookie prefix is stripped so the clipboard contains
the raw JWT value, ready to paste into a `Cookie: jwt=<value>`
or `Authorization: Bearer <value>` header.
Security:
- Full token is NEVER shown in the UI — only a masked preview
(first 20 chars) appears in the warning notification.
- Full token is NEVER logged — only the masked preview lands
in the Artemis Extension output channel.
- Notification wording explicitly warns "Do not share, do not
commit".
Also adds a new public helper `AuthManager.getRawJwt()` that
extracts the raw JWT, intended for developer/debug surfaces only.1 parent 7cc768e commit 4aa9f2e
3 files changed
Lines changed: 73 additions & 2 deletions
File tree
- extension
- src/extension
- activation
- services/auth
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
85 | 90 | | |
86 | 91 | | |
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
90 | | - | |
| 95 | + | |
| 96 | + | |
91 | 97 | | |
92 | 98 | | |
93 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
425 | 469 | | |
426 | 470 | | |
427 | 471 | | |
| |||
449 | 493 | | |
450 | 494 | | |
451 | 495 | | |
| 496 | + | |
452 | 497 | | |
453 | 498 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
60 | 80 | | |
61 | 81 | | |
62 | 82 | | |
| |||
0 commit comments