Skip to content

Commit ceaf7e4

Browse files
committed
First color the input box before parsing the rest / validating the sig
1 parent f9dbfbd commit ceaf7e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Pages/Home/JwtDecoder/JwtDecoder.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,10 @@
373373
encodedPayload: payloadInfo.length > 1 ? payloadInfo[1] : '',
374374
signature: signature
375375
};
376-
377-
await showDecodedJwt(decodedJwt.header, decodedJwt.payload, decodedJwt.encodedHeader, decodedJwt.encodedPayload, signature);
376+
378377
colorJwtInput($(this), parts, decodedJwt.encodedHeader, decodedJwt.encodedPayload, decodedJwt.signature);
379-
378+
await showDecodedJwt(decodedJwt.header, decodedJwt.payload, decodedJwt.encodedHeader, decodedJwt.encodedPayload, signature);
379+
380380
if (parts.length !== 3) {
381381
showError('Invalid JWT format. A JWT should have three parts separated by dots.');
382382
}

0 commit comments

Comments
 (0)