-
Notifications
You must be signed in to change notification settings - Fork 0
/
token.html
112 lines (91 loc) · 4.46 KB
/
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
105
106
107
108
109
110
111
<!doctype html>
<html lang="en-us">
<head>
<!-- Meta -->
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Token</title>
<meta name="description" content="Local EGA in Norway">
<!-- The compiled CSS file -->
<link rel="stylesheet" href="css/production.css">
<!-- Web fonts -->
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,400i,700|Source+Serif+Pro:700" rel="stylesheet">
<!-- favicon.ico. Place these in the root directory. -->
<link rel="shortcut icon" href="/img/favicon.ico">
</head>
<body class="has-animations">
<div class="container pt3 mt2 text--gray align--center">
<div class="grid-column align--left">
<a href="/" class="link"><img class="logo" style="max-height: 100px; vertical-align: -2em; margin: 20px;" src="/img/EGA_submarcas_Norway.svg" alt="Federated EGA Norway node"></a>
<a href="/docs.html" class="link link--text" style="margin: 8px;">Docs and Info</a>
<a href="/pp.html" class="link link--text" style="margin: 8px;">Privacy Policy</a>
<a href="/tos.html" class="link link--text" style="margin: 8px;">Terms of Service</a>
<a href="mailto:[email protected]" class="link link--text" style="margin: 8px;">Contact Us</a>
<a href="/about.html" class="link link--text" style="margin: 8px;">About</a>
</div>
</div>
<!-- Header -->
<header class="align--center pt3">
<div class="container--lg border--bottom pb3">
<h1 class="mb2">Federated EGA Norway node</h1>
<h2 class="mt3">Token for: </h2>
<p class="text--primary-color bold" id="sub"></p>
</div>
</header>
<main>
<!-- Feature list -->
<div class="container mt2">
<code id="token" class="align--justify align--center-on-mobile text--gray" style="overflow-wrap: break-word; max-width: 100px">
</code>
<div class="grid-row pt1 mt1">
<div class="grid-column align--center align--center-on-mobile">
<button class="btn" data-clipboard-target="#token">
Copy to clipboard
</button>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="pt1 pb3 align--center-on-mobile">
<div class="container">
<div class="grid-row">
<div class="grid-column mt2 align--left align--center-on-mobile">
<ul class="no-bullets list--inline">
<li class="mr1"><a href="mailto:[email protected]" class="text"><img class="icon" src="/img/mail.svg" alt="Contact">[email protected]</a></li>
</ul>
</div>
</div>
<div class="grid-column mt2 span-half">
<p class="small">Design by <a href="https://www.papayatemplates.com" class="link link--text">Papaya</a>. Illustrations from <a href="https://undraw.co/" class="link link--text">Undraw</a>.</p>
</div>
</div>
</footer>
<!-- Scroll reveal -->
<script src="js/scrollreveal.min.js"></script>
<!-- The compiled JavaScript file -->
<script src="js/production.js"></script>
<!-- Cookies popup -->
<script type="text/javascript" id="cookieinfo" src="js/cookieinfo.min.js" data-moreinfo="/pp.html"></script>
<!-- Copy to clipboard button -->
<script src="js/clipboard.min.js"></script>
<script type="text/javascript">
fetch('/token')
.then(response => response.text())
.then(responseText => {
const base64Url = responseText.split('.')[1];
const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
const jsonPayload = decodeURIComponent(atob(base64).split('').map(function(c) {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
}).join(''));
document.getElementById("sub").innerHTML = JSON.parse(jsonPayload)['sub'];
document.getElementById("token").innerHTML = responseText;
new ClipboardJS('.btn');
})
.catch(error => {
console.error('Fetch error:', error);
});
</script>
</body>
</html>