/
main.html
73 lines (73 loc) · 2.73 KB
/
main.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html>
<head>
<title>JWT Encode and Decode using JS</title>
<script type="text/javascript" src="main.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>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<!-- Disables 404 for favicon.ico which is a logo on top of the webpage tab -->
<link rel="shortcut icon" href="#">
<!-- 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>
<div id="myform">
<h4>Payload</h4>
<table>
<tr>
<td><b>Key :</b></td>
<td><input type="text" id="key" placeholder="username"></td>
</tr>
<tr>
<td><b>Value :</b></td>
<td><input type="text" id="value" placeholder="Jarvis"></td>
</tr>
<tr>
<td> </td>
<td><input type="button" id="add" value="Add" onclick="Javascript:addRow()"></td>
<td> </td>
</tr>
</table>
<br>
</div>
<h4>Current data in memory</h4>
<div id="mydata">
<table id="tableData" border="1" cellpadding="2">
<tr>
<td> </td>
<td><b>Key </b></td>
<td><b>Value </b></td>
</tr>
</table>
</div>
<div id="myDynamicTable">
<form>
<input id="secret" name="secret" placeholder="Secret phrase.."
required="" type="password" style="width:20%">
<button id="create" value="Submit" onclick="Javascript:addTable(event)">Submit</button>
</form>
</div>
<h4 id="encoded">Encoded JWT</h4>
<h2 style="text-align:center">JWT Decoder</h2>
<form>
<h4>Encoded JWT</h4>
<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>