JWT Glance
JWT Glance automatically surfaces JWT expiration countdowns, algorithm details, and decoded claim cards directly within your editor—eliminating the insecure reflex of pasting sensitive credentials into third-party web decoders and preventing cryptic ✨ Features
🔒 Security, Privacy & Safe Redaction
🚀 Quickstart
🐨 Ambient Lens & 1-Click Status Bar Toggle
Pause or resume ambient decorations at any time without opening settings:
👤 Customizable Badge Claims & Priority
Customize which claims appear in your ambient badges and CodeLens:
⌨️ Command Palette Reference (
|
| Command | Description |
|---|---|
JWT Glance: Inspect Token at Cursor |
Opens the interactive Action Palette for the token under cursor or selection. |
JWT Glance: Choose Claim for Badge Display |
Interactively reorder, add, and manage fallback claim priorities (e.g. roles → email → sub). |
JWT Glance: Toggle Ambient Lens |
Instantly toggles ambient CodeLens and inline badges on or off. |
JWT Glance: Copy as Authorization: Bearer Header |
Copies formatted "Authorization: Bearer <token>" header to clipboard for API clients. |
JWT Glance: Inspect Token from Clipboard |
Decodes a token straight from clipboard memory without saving to disk. |
JWT Glance: Copy Redacted Token |
Copies a safe diagnostic token with sensitive claims and signature redacted. |
⚙️ Configuration Settings
Configure JWT Glance using the single "jwtGlance" object in your VS Code settings.json:
{
"jwtGlance": {
"enabled": true,
"showStatusBarItem": true,
"glanceClaims": ["roles", "name", "email", "sub"],
"maxGlanceClaims": 3,
"position": "top",
"overviewRuler": true,
"maxOverviewRulerTokens": 50,
"dimExpiredTokens": true,
"expiringSoonThreshold": 1800,
"maxLineLength": 10000,
"maxDocumentCharacters": 524288,
"exclude": [
"**/package-lock.json",
"**/yarn.lock",
"**/pnpm-lock.yaml",
"**/*.min.*",
"**/*.map"
],
"languages": ["*"],
"policies": []
}
}
| Setting Property | Type | Default | Description |
|---|---|---|---|
enabled |
boolean |
true |
Enable or disable ambient glance badges and hover cards. |
showStatusBarItem |
boolean |
true |
Display a toggle icon in the status bar footer for 1-click toggling. |
glanceClaims |
string[] \| string |
["roles", "name", "email", "sub"] |
Priority claim keys to display in badges (e.g. ["roles", "name", "email", "sub"]). Displays up to maxGlanceClaims matches. |
maxGlanceClaims |
number |
3 |
Maximum number of claim fields to display simultaneously in ambient glance badges and CodeLens. |
position |
'top' \| 'left' \| 'both' |
'top' |
Badge position: 'top' (native CodeLens above line), 'left' (inline colored text), or 'both' (CodeLens and inline text). |
overviewRuler |
boolean |
true |
Show token health indicators in the scrollbar overview ruler. |
maxOverviewRulerTokens |
number |
50 |
Max tokens in overview ruler per file (0 disables scrollbar markers). |
dimExpiredTokens |
boolean |
true |
Dim expired tokens (55% opacity) to visually separate dead credentials. |
expiringSoonThreshold |
number |
1800 |
Seconds before expiration to show amber warning (default 30m). |
maxLineLength |
number |
10000 |
Max characters per line to scan (prevents lag on minified files). |
maxDocumentCharacters |
number |
524288 |
Max document size to scan (~512 KB) to maintain responsiveness. |
exclude |
string[] |
["**/package-lock.json", ...] |
Glob patterns of files to exclude from ambient scanning. |
languages |
string[] |
["*"] |
Language identifiers to scan (default ["*"] for all languages). |
policies |
array |
[] |
Opt-in workspace policies for issuer, audience, and claim validation. |
(Note: Legacy flat "jwtGlance.<property>" configurations are also supported for backwards compatibility).
🎨 Visual Design & How Colors Work
JWT Glance is designed to integrate cleanly with any VS Code theme without cluttering your code:
- Top Badge (
position: "top", default): Rendered as native VS Code CodeLens directly above the token line. In VS Code, CodeLens text is styled in muted gray (editorCodeLens.foreground). Token health is indicated at a glance via Codicons ($(pass-filled)active,$(clock)expiring soon,$(error)expired,$(shield) $(alert)unsecured,$(key)permanent), dead credential text dimming, and scrollbar markers. - Scrollbar Overview Ruler (
overviewRuler: true, default): Displays color-coded health indicators in the editor's right scrollbar across all modes (green for active, amber for warning, red for expired/unsecured, cyan for permanent keys). - Inline Badge (
position: "left"or"both"): Displays clean colored text directly before the token using your theme's semantic colors (green, amber, red, etc.) with no background boxes, borders, or brackets. - Dead Credential Dimming (
dimExpiredTokens: true, default): Automatically dims expired tokens to 55% opacity so dead credentials visually recede while remaining fully clickable.
Opt-In Workspace Policies Example
Enforce token conformance locally in .vscode/settings.json without outbound network calls:
{
"jwtGlance": {
"policies": [
{
"name": "Local API Fixtures",
"files": ["**/*.http", "**/.env*"],
"issuer": "https://auth.company.com",
"audience": "orders-api",
"allowedAlgorithms": ["RS256", "ES256"],
"requiredClaims": ["sub", "tenant_id", "exp"],
"maximumTokenAgeSeconds": 86400,
"requireExpiration": true
}
]
}
}
- Scoped Validation: Violations surface directly in the VS Code Problems panel and hover cards.
- Smart Defaults: Omitted
filesdefaults to["**/*.http", "**/.env*"]andrequireExpirationdefaults totrue. - Custom Claims & Max-Age: Validates both registered and custom claims (
tenant_id, etc.) and asserts token age againstiat(with 60s clock skew tolerance). - Sanitized Hover Cards: Policy warnings in hover cards are stripped of raw markdown to prevent spoofed links or headings.
Setting scope: Workspace settings in
.vscode/settings.jsonoverride user settings. Changes take effect immediately in open editors.
🤝 Contributing & Development
For development setup, local debugging (F5), test suites, and packaging instructions, see CONTRIBUTING.md.
For security policies and vulnerability reporting, see SECURITY.md.
📄 License
MIT © 2026 kcodek



