-
Notifications
You must be signed in to change notification settings - Fork 0
/
display-token.html
104 lines (73 loc) · 2.63 KB
/
display-token.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Token</title>
<style type="text/css">
body,html { height: 100%; width: 100%; background-color:#e0f0f0; font-family: "Times New Roman" }
h1,h2,h3{ margin: 0; padding: 0; color:#334455 }
h1 { border-bottom: 1px dotted #ccddee; padding: 20px; font-size: 3em; }
h2 { width: 90%; margin: auto; margin-top:30px; border: 0; font-size: 2em; }
h3 {font-size: 0.9em; }
h3 span{ color:#556677; font-weight: normal; }
a { color: #225577; }
a:hover { color: #5588aa; }
.page-header ,
.page-body,
.page-footer{ width: 780px; margin: auto; }
.page-header{ margin-bottom: 20px;}
.page-footer{ margin-bottom: 20px;}
.page-body{ border: 20px solid #d0f0f0; background-color: #e8f8f8; padding-bottom: 40px; }
.clear-float{ clear:both;}
.center{ text-align: center}
.message{ position: relative;}
.message .alert{ color:red; font-size:1.5em; }
.message .caption{ font-size: 0.8em; top:-6px; position: relative; }
p {
width: 90%; margin: auto; border: 0; margin-bottom: 10px;
}
textarea{
width: 100%;
height: 200px; background: transparent; display: block;
font-family: "Times New Roman"; font-size: 0.8em;
border: 1px dotted #445566; background-color: #fefefe;
}
.strong{ font-weight: bold;}
</style>
<script type="text/javascript">
function copyToClipboard(field) {
var copyText = document.getElementById(field.id);
copyText.select();
document.execCommand("copy");
alert("Copied the token to the clipboard");
}
</script>
</head>
<body>
<div class="page-header" >
<h1></h1>
</div>
<div class="page-body" >
<h2>Surrogate Token</h2>
<p class="strong">Token generated by this app</p>
<p>
<textarea id="surrogate-token" onclick="copyToClipboard(this)">{{.SurrogateToken}}</textarea>
<div class="message center">
This token expires on: {{.SurrogateExpires}}
</div>
</p>
<h2>Identity Token</h2>
<p class="strong">Token generated by the identity provider</p>
<p>
<textarea id="access-token" onclick="copyToClipboard(this)">{{.AccessToken}}</textarea>
</p>
<div class="message center">
Inspect this JWT through <a href="https://jwt.io/" target="_blank">https://jwt.io/</a>
</div>
<div class="clear-float"></div>
</div>
<div class="page-footer" >
<h1></h1>
</div>
</body>
</html>