/
index.html
47 lines (47 loc) · 1.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html>
<head>
<title>JWT Encode and Decode using JS</title>
<script type="text/javascript" src="index.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.js"></script>
<!-- CSS and JS for night mode -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<script type="text/javascript" src="https://rawgit.com/thevickypedia/open-source/main/nightmode/night.js" defer></script>
<link rel="stylesheet" href="https://rawgit.com/thevickypedia/open-source/main/nightmode/night.css">
</head>
<body translate="no">
<div class="toggler fa fa-moon-o"></div>
<h2 style="text-align:center">JWT Encoder</h2>
<form>
<h4>Secret</h4>
<fieldset style="width:40%">
<input id="secret" name="secret" placeholder="Secret"
required="" type="password" style="width:50%">
</fieldset>
<h4>Payload</h4>
<fieldset style="width:40%">
<textarea id="payload" name="payload" placeholder='{"username": "Jarvis"}'
required="" style="width:50%">{"username": "Jarvis"}</textarea>
</fieldset>
<fieldset style="width:40%">
<button id="form-submit" onclick="Javascript:tokenize(event)" type="submit" style="text-align:center">
Submit
</button>
</fieldset>
</form>
<h4 id="encoded">Encoded JWT</h4>
<h2 style="text-align:center">JWT Decoder</h2>
<form>
<fieldset style="width:40%">
<textarea id="encoded_token" name="encoded_token" required="" style="width:50%"></textarea>
</fieldset>
<fieldset style="width:40%">
<button id="submit" onclick="Javascript:parseJWT(event)" type="submit" style="text-align:center">
Submit
</button>
</fieldset>
</form>
<h4 id="decoded">Decoded JWT</h4>
</body>
</html>