Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Findeton committed Jun 28, 2024
1 parent 9697b09 commit 923ed9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions avRegistration/auth-method-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ angular.module('avRegistration')
var decodedToken = authmethod.decodeToken($http.defaults.headers.common.Authorization);
var secsDiff = getSecondsDifference(authmethod.lastAuthDate, now);
var halfLife = decodedToken.expiry_secs_diff * 0.5;
console.log("secsDiff " + secsDiff + " halfLife " + halfLife);
if (secsDiff <= halfLife) {
return;
}
Expand Down
5 changes: 3 additions & 2 deletions dist/appCommon-v10.4.2.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ angular.module("avRegistration").config(function() {}), angular.module("avRegist
if (authmethod.admin = isAdmin, $http.defaults.headers.common.Authorization = auth,
authmethod.lastAuthDate = new Date(), !authmethod.iddleDetectionSetup) return authmethod.iddleDetectionSetup = !0,
callback = function() {
var date1, date2, now = new Date(), decodedToken = authmethod.decodeToken($http.defaults.headers.common.Authorization);
(date1 = authmethod.lastAuthDate, date2 = now, Math.abs(date2 - date1) / 1e3) <= .5 * decodedToken.expiry_secs_diff || (authmethod.lastAuthDate = now,
var date2, now = new Date(), halfLife = authmethod.decodeToken($http.defaults.headers.common.Authorization), secsDiff = (secsDiff = authmethod.lastAuthDate,
date2 = now, Math.abs(date2 - secsDiff) / 1e3), halfLife = .5 * halfLife.expiry_secs_diff;
console.log("secsDiff " + secsDiff + " halfLife " + halfLife), secsDiff <= halfLife || (authmethod.lastAuthDate = now,
authmethod.refreshAuthToken(autheventid));
}, [ "click", "keypress", "mousemove", "mousedown", "touchstart", "touchmove" ].forEach(function(event) {
document.addEventListener(event, callback);
Expand Down

0 comments on commit 923ed9c

Please sign in to comment.