Skip to content

Commit 39f4f89

Browse files
committed
fix tokeninfo remote info
1 parent ef725ec commit 39f4f89

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

internal/server/web/static/js/tokeninfo-status.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async function update_tokeninfo() {
3636
fillTokenInfo(payload);
3737
return;
3838
}
39-
let tokeninfoEndpoint = storageGet('tokeninfo_endpoint');
39+
tokeninfoEndpointToUse = storageGet('tokeninfo_endpoint');
4040
let jwksUri = storageGet('jwks_uri');
4141
transferEndpoint = "";
4242
try {
@@ -52,7 +52,7 @@ async function update_tokeninfo() {
5252
await fetch(url).then(function (res) {
5353
return res.json();
5454
}).then(function (data) {
55-
tokeninfoEndpoint = data['tokeninfo_endpoint'];
55+
tokeninfoEndpointToUse = data['tokeninfo_endpoint'];
5656
jwksUri = data['jwks_uri'];
5757
transferEndpoint = data['token_transfer_endpoint'];
5858
}).catch(function (e) {
@@ -78,7 +78,7 @@ async function update_tokeninfo() {
7878
try {
7979
await $.ajax({
8080
type: "POST",
81-
url: tokeninfoEndpoint,
81+
url: tokeninfoEndpointToUse,
8282
data: JSON.stringify({
8383
'action': 'introspect',
8484
'mytoken': token,

internal/server/web/static/js/tokeninfo.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
const $tokenInput = $('#tokeninfo-token');
22

3+
let tokeninfoEndpointToUse;
4+
35
function _tokeninfo(action, successFnc, errorFnc, token = undefined) {
46
let data = {
57
'action': action
@@ -10,7 +12,7 @@ function _tokeninfo(action, successFnc, errorFnc, token = undefined) {
1012
data = JSON.stringify(data);
1113
$.ajax({
1214
type: "POST",
13-
url: storageGet('tokeninfo_endpoint'),
15+
url: tokeninfoEndpointToUse,
1416
data: data,
1517
success: successFnc,
1618
error: errorFnc,
@@ -222,6 +224,7 @@ const listMsg = $('#list-msg');
222224
const listCopy = $('#list-copy');
223225

224226
function _getListTokenInfo(token) {
227+
tokeninfoEndpointToUse = storageGet("tokeninfo_endpoint");
225228
_tokeninfo('list_mytokens',
226229
function (infoRes) {
227230
listMsg.html(tokenlistToHTML(infoRes['mytokens'], revocationClassFromTokenList));

0 commit comments

Comments
 (0)