1 |
59492
|
katerina.i
|
<!DOCTYPE html>
|
2 |
59646
|
k.triantaf
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
3 |
59492
|
katerina.i
|
<html lang="en-gb" dir="ltr" vocab="http://schema.org/">
|
4 |
|
|
<head>
|
5 |
59646
|
k.triantaf
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
6 |
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
7 |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
8 |
|
|
<title>OpenAIRE - Personal token</title>
|
9 |
|
|
<script src="./js/jquery.js"></script>
|
10 |
59806
|
k.triantaf
|
<script src="./js/uikit.min.js"></script>
|
11 |
59646
|
k.triantaf
|
<script src="./js/uikit-icons-max.js"></script>
|
12 |
|
|
<script>
|
13 |
|
|
function copy(id) {
|
14 |
|
|
var element = document.getElementById(id);
|
15 |
|
|
if (document.body.createTextRange) {
|
16 |
|
|
range = document.body.createTextRange();
|
17 |
|
|
range.moveToElementText(element);
|
18 |
|
|
range.select();
|
19 |
|
|
} else if (window.getSelection) {
|
20 |
|
|
selection = window.getSelection();
|
21 |
|
|
range = document.createRange();
|
22 |
|
|
range.selectNodeContents(element);
|
23 |
|
|
selection.removeAllRanges();
|
24 |
|
|
selection.addRange(range);
|
25 |
|
|
}
|
26 |
|
|
try {
|
27 |
|
|
document.execCommand('copy');
|
28 |
|
|
UIkit.notification({message: 'Copied to clipboard!', status: 'primary', pos: 'top-right'});
|
29 |
|
|
} catch (err) {
|
30 |
|
|
console.error('unable to copy text');
|
31 |
|
|
}
|
32 |
|
|
}
|
33 |
|
|
</script>
|
34 |
|
|
<link rel="stylesheet" style="text/css" href="./css/theme.css">
|
35 |
|
|
<link rel="stylesheet" style="text/css" href="./css/custom.css">
|
36 |
|
|
<link rel="stylesheet" style="text/css" href="./css/aai-custom.css">
|
37 |
|
|
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon/favicon-32x32.png">
|
38 |
|
|
<link rel="icon" type="image/png" sizes="96x96" href="images/favicon//favicon-96x96.png">
|
39 |
|
|
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon/favicon-16x16.png">
|
40 |
|
|
<link href="images/favicon/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon"/>
|
41 |
59492
|
katerina.i
|
</head>
|
42 |
|
|
<body class="" style="">
|
43 |
59646
|
k.triantaf
|
<div class="uk-offcanvas-content uk-height-viewport">
|
44 |
|
|
<jsp:include page="header.jsp"/>
|
45 |
59492
|
katerina.i
|
<div class="first_page_section uk-section-default uk-section uk-padding-remove-vertical">
|
46 |
59646
|
k.triantaf
|
<div class="first_page_banner_headline uk-grid-collapse uk-flex-middle uk-margin-remove-vertical uk-grid"
|
47 |
|
|
uk-grid="">
|
48 |
|
|
</div>
|
49 |
59492
|
katerina.i
|
</div>
|
50 |
59518
|
argiro.kok
|
<div class=" uk-section uk-margin-small-top uk-container uk-container-large" id="tm-main">
|
51 |
59646
|
k.triantaf
|
<div class="uk-grid ">
|
52 |
|
|
<div class="uk-width-1-4@m">
|
53 |
|
|
<div class="uk-card uk-card-default uk-card-body">
|
54 |
|
|
<div class="uk-h4">API Access</div>
|
55 |
|
|
<ul class="uk-nav uk-nav-default">
|
56 |
|
|
<li class="uk-active"><a href="./personalToken">Personal token</a></li>
|
57 |
|
|
<li class=""><a href="./registeredServices">Registered services</a></li>
|
58 |
|
|
<%--<li class="uk-parent">
|
59 |
|
|
<a href="#">Parent</a>
|
60 |
|
|
<ul class="uk-nav-sub">
|
61 |
|
|
<li><a href="#">Sub item</a></li>
|
62 |
|
|
<li>
|
63 |
|
|
<a href="#">Sub item</a>
|
64 |
|
|
<ul>
|
65 |
|
|
<li><a href="#">Sub item</a></li>
|
66 |
|
|
<li><a href="#">Sub item</a></li>
|
67 |
|
|
</ul>
|
68 |
|
|
</li>
|
69 |
|
|
</ul>
|
70 |
|
|
</li>--%>
|
71 |
59518
|
argiro.kok
|
</ul>
|
72 |
59646
|
k.triantaf
|
</div>
|
73 |
|
|
</div>
|
74 |
|
|
<!-- CENTER SIDE -->
|
75 |
|
|
<div class="uk-width-2-3@l uk-width-2-3@m">
|
76 |
|
|
<div>
|
77 |
|
|
<span id="server_error" class="uk-text-danger uk-text-small uk-float-left">${message}</span>
|
78 |
|
|
<c:remove var="message" scope="session"/>
|
79 |
|
|
<div class="uk-alert-primary uk-margin-remove-top uk-alert uk-flex uk-flex-middle">
|
80 |
|
|
<span uk-icon="info"></span>
|
81 |
|
|
<span class="uk-margin-small-left">
|
82 |
|
|
For further information on how to use the tokens please visit the
|
83 |
|
|
<a href="">OpenAIRE API Authentication documentation</a>.
|
84 |
|
|
</span>
|
85 |
|
|
</div>
|
86 |
|
|
<form id="revoke" name="revoke" action="./personalToken" method="post">
|
87 |
|
|
<!-- <a class=" uk-text-danger uk-float-right" title="Revoke access token" onClick="document.revoke.submit();"><span uk-icon="refresh" ></span></a> -->
|
88 |
|
|
<h4 class="uk-margin-remove-top uk-text-bold uk-text-primary">Your personal access token is</h4>
|
89 |
|
|
<div class="uk-flex uk-flex-middle uk-margin-bottom">
|
90 |
|
|
<div class="uk-width-expand">
|
91 |
|
|
<pre class="uk-margin-remove-bottom"><code id="accessToken">${accessToken}</code></pre>
|
92 |
|
|
</div>
|
93 |
|
|
<div class="uk-width-auto uk-padding-small uk-text-center">
|
94 |
|
|
<a onclick="copy('accessToken')"
|
95 |
|
|
title="Copy access token"><span uk-icon="copy"></span>
|
96 |
|
|
</a>
|
97 |
|
|
</div>
|
98 |
|
|
</div>
|
99 |
|
|
<div class="uk-flex uk-flex-middle">
|
100 |
|
|
<span uk-icon="info"></span>
|
101 |
|
|
<span class="uk-margin-small-left">
|
102 |
|
|
Your access token is <span class="uk-text-bold">valid for an hour</span>.
|
103 |
|
|
</span>
|
104 |
|
|
</div>
|
105 |
|
|
<div class="uk-text-danger uk-flex uk-flex-middle uk-margin-small-top">
|
106 |
|
|
<span uk-icon="warning"></span>
|
107 |
|
|
<span class="uk-margin-small-left">
|
108 |
|
|
Do not share your personal access token. Send your personal access token only over HTTPS.
|
109 |
|
|
</span>
|
110 |
|
|
</div>
|
111 |
|
|
</form>
|
112 |
|
|
</div>
|
113 |
|
|
<div class="uk-section">
|
114 |
|
|
<!--<a class=" uk-text-danger uk-float-right" title="Revoke refresh token"><span uk-icon="refresh"></span></a>-->
|
115 |
|
|
<c:choose>
|
116 |
|
|
<c:when test="${showRefreshToken == true}">
|
117 |
|
|
<h4 class="uk-margin-remove-top uk-text-bold uk-text-primary">Your refresh token is</h4>
|
118 |
|
|
<div class="uk-flex uk-flex-middle uk-margin-bottom">
|
119 |
|
|
<div class="uk-width-expand">
|
120 |
|
|
<pre class="uk-margin-remove-bottom"><code id="refreshToken">${refreshToken}</code></pre>
|
121 |
|
|
</div>
|
122 |
|
|
<div class="uk-width-auto uk-padding-small uk-text-center">
|
123 |
|
|
<a onclick="copy('refreshToken')"
|
124 |
|
|
title="Copy refreshToken token"><span uk-icon="copy"></span>
|
125 |
|
|
</a>
|
126 |
|
|
</div>
|
127 |
|
|
</div>
|
128 |
|
|
<div class="uk-flex uk-flex-middle">
|
129 |
|
|
<span uk-icon="info"></span>
|
130 |
|
|
<span class="uk-margin-small-left">OpenAIRE refresh token <span class="uk-text-bold">expires after 1 month</span> and allows you to programmatically get a new access token.</span>
|
131 |
|
|
</div>
|
132 |
|
|
<div class="uk-text-danger uk-flex uk-flex-middle uk-margin-small-top">
|
133 |
|
|
<span uk-icon="warning"></span>
|
134 |
|
|
<div class="uk-margin-small-left">
|
135 |
|
|
<div>Please copy your refresh token and store it confidentially. You will not be able to retrieve it.</div>
|
136 |
|
|
<div>Do not share your refresh token. Send your refresh token only over HTTPS.</div>
|
137 |
|
|
</div>
|
138 |
|
|
</div>
|
139 |
|
|
</c:when>
|
140 |
|
|
<c:otherwise>
|
141 |
|
|
<h4 class="uk-margin-remove-top uk-text-bold uk-text-primary">Do you need a refresh token?</h4>
|
142 |
|
|
<div class="uk-flex uk-flex-middle">
|
143 |
|
|
<span uk-icon="info"></span>
|
144 |
|
|
<span class="uk-margin-small-left">OpenAIRE refresh token <span class="uk-text-bold">expires after 1 month</span> and allows you to programmatically get a new access token.</span>
|
145 |
|
|
</div>
|
146 |
|
|
<button type="submit" class="uk-button uk-button-primary uk-margin-medium-top" uk-toggle="target: #refreshWarning">Get a
|
147 |
|
|
refresh token
|
148 |
|
|
</button>
|
149 |
|
|
</c:otherwise>
|
150 |
|
|
</c:choose>
|
151 |
59492
|
katerina.i
|
|
152 |
59646
|
k.triantaf
|
</div>
|
153 |
59621
|
katerina.i
|
|
154 |
59646
|
k.triantaf
|
<!-- This is the modal -->
|
155 |
|
|
<div id="refreshWarning" uk-modal>
|
156 |
|
|
<div class="uk-modal-dialog uk-modal-body">
|
157 |
|
|
<form id="refreshForm" action="./personalToken" method="POST">
|
158 |
|
|
<h2 class="uk-modal-title">Get refresh token</h2>
|
159 |
|
|
<p>In case you already have a refresh token, it will no longer be valid. Do you want to
|
160 |
|
|
proceed?</p>
|
161 |
|
|
<p class="uk-text-right">
|
162 |
|
|
<button class="uk-button uk-button-default uk-modal-close" type="button">Cancel</button>
|
163 |
|
|
<button class="uk-button uk-button-primary uk-margin-small-left" type="button" onclick="submit();">Get
|
164 |
|
|
refresh token
|
165 |
|
|
</button>
|
166 |
|
|
</p>
|
167 |
|
|
</form>
|
168 |
|
|
</div>
|
169 |
59621
|
katerina.i
|
</div>
|
170 |
|
|
</div>
|
171 |
|
|
|
172 |
59646
|
k.triantaf
|
<!-- END OF CENTER SIDE -->
|
173 |
59492
|
katerina.i
|
</div>
|
174 |
|
|
</div>
|
175 |
|
|
<!-- CONTENT ENDS HERE -->
|
176 |
59661
|
k.triantaf
|
<c:import url="footer.jsp"/>
|
177 |
59646
|
k.triantaf
|
</div>
|
178 |
59492
|
katerina.i
|
</body>
|
179 |
|
|
</html>
|