fixed
This commit is contained in:
parent
9411728b3a
commit
12d3d7eb97
|
@ -658,17 +658,17 @@
|
|||
body : params,
|
||||
credentials: "include"
|
||||
}).then(resp=>{
|
||||
if(req.status == 200){
|
||||
return req.json()
|
||||
if(resp.status == 200){
|
||||
return resp.json()
|
||||
}
|
||||
if (req.status == 400) {
|
||||
if (resp.status == 400) {
|
||||
kc.clearToken();
|
||||
}
|
||||
throw "Failed to refresh token"
|
||||
}).then(body=>{
|
||||
logInfo('[KEYCLOAK] Token refreshed');
|
||||
timeLocal = (timeLocal + new Date().getTime()) / 2;
|
||||
var tokenResponse = JSON.parse(req.responseText);
|
||||
var tokenResponse = body
|
||||
setToken(tokenResponse['access_token'], tokenResponse['refresh_token'], tokenResponse['id_token'], timeLocal);
|
||||
kc.onAuthRefreshSuccess && kc.onAuthRefreshSuccess();
|
||||
for (var p = refreshQueue.pop(); p != null; p = refreshQueue.pop()) {
|
||||
|
|
Loading…
Reference in New Issue