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>
The process should also return the state provided.
<pre class="code" id="state-param"></pre>
<div id="oncode">
<h2>Code</h2>
<p>The code is generated by the Authentication server and send back
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
<em>refresh token</em>.
That is just making another call to <code>/token</code>
But with different parameters.
But with different parameters. </p>
<div class="button"
onclick="getAccessToken();">
Get Access Tokens from Refresh Token
</div>
<pre id="refreshed" class="code">Nothing yet.</pre>
<pre id="refreshed-access-token" class="code">Nothing yet.</pre>
</div>
<script>
function getJsonFromUrl() {
var query = location.search.substr(1);
@ -76,6 +78,7 @@
if (params.error) {
authstatus = "REFUSED: " + params.error;
$('#authorization_status').addClass('refused');
$('#oncode').hide();
} else {
authstatus = "AUTHORIZED" ;
$('#authorization_status').addClass('authorized');