hide interactive part on error

This commit is contained in:
Yann Esposito (Yogsototh) 2018-02-20 14:03:40 +01:00
parent 480f4ed07c
commit 93338b438e
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646

View file

@ -17,6 +17,7 @@
<h3>State</h3> <h3>State</h3>
The process should also return the state provided. The process should also return the state provided.
<pre class="code" id="state-param"></pre> <pre class="code" id="state-param"></pre>
<div id="oncode">
<h2>Code</h2> <h2>Code</h2>
<p>The code is generated by the Authentication server and send back <p>The code is generated by the Authentication server and send back
to the client via the resource's owner user-agent</p> to the client via the resource's owner user-agent</p>
@ -54,13 +55,14 @@
<p>This is why the client must require a new access token using its <p>This is why the client must require a new access token using its
<em>refresh token</em>. <em>refresh token</em>.
That is just making another call to <code>/token</code> That is just making another call to <code>/token</code>
But with different parameters. But with different parameters. </p>
<div class="button" <div class="button"
onclick="getAccessToken();"> onclick="getAccessToken();">
Get Access Tokens from Refresh Token Get Access Tokens from Refresh Token
</div> </div>
<pre id="refreshed" class="code">Nothing yet.</pre> <pre id="refreshed" class="code">Nothing yet.</pre>
<pre id="refreshed-access-token" class="code">Nothing yet.</pre> <pre id="refreshed-access-token" class="code">Nothing yet.</pre>
</div>
<script> <script>
function getJsonFromUrl() { function getJsonFromUrl() {
var query = location.search.substr(1); var query = location.search.substr(1);
@ -76,6 +78,7 @@
if (params.error) { if (params.error) {
authstatus = "REFUSED: " + params.error; authstatus = "REFUSED: " + params.error;
$('#authorization_status').addClass('refused'); $('#authorization_status').addClass('refused');
$('#oncode').hide();
} else { } else {
authstatus = "AUTHORIZED" ; authstatus = "AUTHORIZED" ;
$('#authorization_status').addClass('authorized'); $('#authorization_status').addClass('authorized');