Add function for showing the JWT token in the page for testing back-end
This commit is contained in:
parent
014b842f56
commit
9c073b90c7
@ -43,6 +43,10 @@
|
||||
req.send();
|
||||
};
|
||||
|
||||
function showToken() {
|
||||
alert(keycloak.token);
|
||||
}
|
||||
|
||||
function testCors() {
|
||||
|
||||
var createCORSRequest = function(method, url) {
|
||||
@ -83,6 +87,8 @@
|
||||
<body onload="initKeycloak()">
|
||||
<h1>This is a simple web page to test Gonito as a backend with authorization by JWT tokens.</h1>
|
||||
|
||||
<p><button onclick="showToken()">Show token</button></p>
|
||||
|
||||
<p><button onclick="loadData('add-user')">Add user</button></p>
|
||||
|
||||
<p><button onclick="loadData('user-info')">Check user info</button></p>
|
||||
|
Loading…
Reference in New Issue
Block a user