Skip to content

Decode JWT token and verify signature#2454

Open
hl6226 wants to merge 1 commit into
gchq:masterfrom
hl6226:jwt-decode-verify
Open

Decode JWT token and verify signature#2454
hl6226 wants to merge 1 commit into
gchq:masterfrom
hl6226:jwt-decode-verify

Conversation

@hl6226
Copy link
Copy Markdown

@hl6226 hl6226 commented May 25, 2026

Decode JWT token and verify signature

Description

  1. Decode JWT token and show both header and payload
  2. Verify signature supporting three formats of public key
  3. Show header, payload and signature sections in different colors
  4. Show formatted date string of iat, nbf and exp claims, e.g., iat: Sun, 24 May 2026 16:32:20 GMT
  5. Validate whether the token has expired

Existing Issue

  1. Existing JWT Decode operation only shows payload but does not show header section
  2. Existing JWT Verify operation does not support JSON format public key
  3. Existing JWT Decode or JWT Verify operation does not show different colors in either Input or Output fields
  4. Existing JWT Verify operation shows error "Right hand side of instanceof is not an object", as reported at: Bug report: JWT sign broken again #2434
  5. Existing JWT Decode operation only shows number of iat, nbf and exp claim, e.g., iat: 1779640340

Screenshots
If the pull request changes any visual aspects of CyberChef, please include screenshots.
CyberChef - JWT Decode and Verify.pdf

AI disclosure
If you have used any AI tools while creating this code, you must declare your usage along with the name of the tools that you used.
Regardless of AI tool usage, you are responsible for any code that you submit, and we expect you to have checked the code and have enough of an understanding of it to answer any questions we might have.
I used Amazon Q. I read through every line of changed/new code and tested it in http://localhost:8080.

Test Coverage
Please ensure you have added test coverage for your changes.

…ture supporting three formats of public key; 3. Show header, payload and signature sections in different colors
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 25, 2026

CLA assistant check
All committers have signed the CLA.

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