5554-renovar_token #1566
|
@ -10,7 +10,6 @@ export class Layout extends Component {
|
||||||
|
|
||||||
$onInit() {
|
$onInit() {
|
||||||
this.getUserData();
|
this.getUserData();
|
||||||
// this.getAccessTokenConfig();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getUserData() {
|
getUserData() {
|
||||||
|
@ -28,25 +27,6 @@ export class Layout extends Component {
|
||||||
return `/api/Images/user/160x160/${userId}/download?access_token=${token}`;
|
return `/api/Images/user/160x160/${userId}/download?access_token=${token}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
getAccessTokenConfig() {
|
|
||||||
this.$http.get('AccessTokenConfigs/findOne').then(json => {
|
|
||||||
window.localStorage.renewPeriod = json.data.renewPeriod;
|
|
||||||
window.localStorage.renewInterval = json.data.renewInterval;
|
|
||||||
|
|
||||||
const intervalMilliseconds = 1 * 1000;
|
|
||||||
const intervalID = setInterval(this.checkTokenValidity, intervalMilliseconds);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
checkTokenValidity() {
|
|
||||||
console.log('checkTokenValidity');
|
|
||||||
|
|
||||||
// this.$http.post('VnUsers/renewToken')
|
|
||||||
// .then(() => {
|
|
||||||
// console.log('fin');
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
|
|
||||||
refresh() {
|
refresh() {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue