Socket
Socket
Sign inDemoInstall

@webex/internal-plugin-wdm

Package Overview
Dependencies
9
Maintainers
21
Versions
1184
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.63.2 to 1.65.0

80

dist/device/device.js

@@ -759,20 +759,26 @@ 'use strict';

// Clear any previously set timers and listeners
clearTimeout(this.logoutTimer);
this.off('change:lastUserActivityDate'); // removes previous event listener
this.unset('logoutTimer');
/**
* _resetLogoutTimer
* Initially clears the timer and removes the onChange event listener for lastUserActivityDate and unsets the timer
* Checks if the client is not in meeting
* Checks for the inactivityEnforcement, intranetInactivityCheckUrl, intranetDuration, also if intranetDuration isn't
* -1 which is the value set for duration option None/default value for the duration.
* It also checks if the url was reachable once then sets the isInNetwork to true there by preventing the reset timer
* from being called each time meeting events resets the timer.
*/
if (!this.isInMeeting) {
if (this.config.enableInactivityEnforcement && this.intranetInactivityCheckUrl && this.intranetInactivityDuration && !this.isInNetwork && this.intranetInactivityDuration !== -1) {
this.on('change:lastUserActivityDate', function () {
_this11._resetLogoutTimer();
});
var timer = (0, _commonTimers.safeSetTimeout)(function () {
// Check if user is not in a meeting and not in network and if enableInactivityEnforcement is true to set a timer
if (!this.isInMeeting && this.config.enableInactivityEnforcement && !this.isInNetwork) {
// If intranetInactivityDuration is not specified then dont logout user
if (!this.intranetInactivityDuration) {
return;
}
// If duration is set to none then don't logout web client.
if (this.intranetInactivityDuration && this.intranetInactivityDuration === -1) {
return;
}
// Setup a listener for last user activity change and call _resetLogoutTimer on change.
this.on('change:lastUserActivityDate', function () {
_this11._resetLogoutTimer();
});
var timer = (0, _commonTimers.safeSetTimeout)(function () {
// If there is no url specified logout user on timeout.
if (!_this11.intranetInactivityCheckUrl) {
_this11.webex.logout();
} else {
// Else check url reachability to see if user is in network and set isInNetwork to true if reachable or logout.
_this11.webex.request({

@@ -795,38 +801,36 @@ headers: {

});
}, this.intranetInactivityDuration * 1000);
}
}, this.intranetInactivityDuration * 1000);
this.logoutTimer = timer;
}
this.logoutTimer = timer;
}
},
// In-Network logout timer
_inNetworkResetLogoutTimer: function _inNetworkResetLogoutTimer() {
var _this12 = this;
// Clear any previously set timers and listeners
clearTimeout(this.inNetworkLogoutTimer);
this.off('change:lastInNetworkUserActivityDate'); // removes previous event listener
this.unset('inNetworkLogoutTimer');
/**
* _inNetworkResetLogoutTimer
* Initially clears the timer and removes the onChange event listener for lastInNetworkUserActivityDate and unsets the timer
* Checks if the client is not in meeting
* Checks for the inactivityEnforcement, intranetInactivityCheckUrl, inNetworkInactivityDuration, also if
* inNetworkInactivityDuration isn't -1 which is the value set for duration option None/default value for the duration.
* It logs the user out on successful/unsuccessful ping of the url. This action is with the following point in mind,
* In-Network Duration is expected to be greater than the Off-Network so if the url turns out to be un-reachable its
* saft to log the user out.
*/
if (!this.isInMeeting) {
if (this.config.enableInactivityEnforcement && this.inNetworkInactivityDuration && this.inNetworkInactivityDuration !== -1) {
this.on('change:lastInNetworkUserActivityDate', function () {
_this12._inNetworkResetLogoutTimer();
});
var inNetworkTimer = (0, _commonTimers.safeSetTimeout)(function () {
_this12.webex.logout();
}, this.inNetworkInactivityDuration * 1000);
* Check if user is not in a meeting and not in network and if enableInactivityEnforcement is true
* Check if inNetworkInactivityDuration exists and is not set to -1 then setup the logout timer
* Else don't logout user.
* */
if (!this.isInMeeting && this.config.enableInactivityEnforcement && this.inNetworkInactivityDuration && this.inNetworkInactivityDuration !== -1) {
this.on('change:lastInNetworkUserActivityDate', function () {
_this12._inNetworkResetLogoutTimer();
});
var inNetworkTimer = (0, _commonTimers.safeSetTimeout)(function () {
_this12.webex.logout();
}, this.inNetworkInactivityDuration * 1000);
this.inNetworkLogoutTimer = inNetworkTimer;
}
this.inNetworkLogoutTimer = inNetworkTimer;
}
},
version: '1.63.2'
version: '1.65.0'
}, (_applyDecoratedDescriptor(_obj, 'determineService', [_dec], (0, _getOwnPropertyDescriptor2.default)(_obj, 'determineService'), _obj), _applyDecoratedDescriptor(_obj, 'getServiceUrl', [_dec2], (0, _getOwnPropertyDescriptor2.default)(_obj, 'getServiceUrl'), _obj), _applyDecoratedDescriptor(_obj, 'initialize', [_dec3], (0, _getOwnPropertyDescriptor2.default)(_obj, 'initialize'), _obj), _applyDecoratedDescriptor(_obj, 'isService', [_dec4], (0, _getOwnPropertyDescriptor2.default)(_obj, 'isService'), _obj), _applyDecoratedDescriptor(_obj, 'isServiceUrl', [_dec5], (0, _getOwnPropertyDescriptor2.default)(_obj, 'isServiceUrl'), _obj), _applyDecoratedDescriptor(_obj, 'isSpecificService', [_dec6], (0, _getOwnPropertyDescriptor2.default)(_obj, 'isSpecificService'), _obj), _applyDecoratedDescriptor(_obj, 'refresh', [_common.oneFlight, _dec7], (0, _getOwnPropertyDescriptor2.default)(_obj, 'refresh'), _obj), _applyDecoratedDescriptor(_obj, 'register', [_common.oneFlight, _dec8], (0, _getOwnPropertyDescriptor2.default)(_obj, 'register'), _obj), _applyDecoratedDescriptor(_obj, 'unregister', [_common.oneFlight, _dec9], (0, _getOwnPropertyDescriptor2.default)(_obj, 'unregister'), _obj)), _obj)));

@@ -833,0 +837,0 @@

{
"name": "@webex/internal-plugin-wdm",
"version": "1.63.2",
"version": "1.65.0",
"description": "",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -14,2 +14,3 @@ /*!

/**

@@ -570,19 +571,25 @@ * Decides if this device should be persisted to boundedStorage, based on

_resetLogoutTimer() {
// Clear any previously set timers and listeners
clearTimeout(this.logoutTimer);
this.off('change:lastUserActivityDate'); // removes previous event listener
this.unset('logoutTimer');
/**
* _resetLogoutTimer
* Initially clears the timer and removes the onChange event listener for lastUserActivityDate and unsets the timer
* Checks if the client is not in meeting
* Checks for the inactivityEnforcement, intranetInactivityCheckUrl, intranetDuration, also if intranetDuration isn't
* -1 which is the value set for duration option None/default value for the duration.
* It also checks if the url was reachable once then sets the isInNetwork to true there by preventing the reset timer
* from being called each time meeting events resets the timer.
*/
if (!this.isInMeeting) {
if (this.config.enableInactivityEnforcement && this.intranetInactivityCheckUrl &&
this.intranetInactivityDuration && !this.isInNetwork && this.intranetInactivityDuration !== -1) {
this.on('change:lastUserActivityDate', () => { this._resetLogoutTimer(); });
const timer = safeSetTimeout(() => {
// Check if user is not in a meeting and not in network and if enableInactivityEnforcement is true to set a timer
if (!this.isInMeeting && this.config.enableInactivityEnforcement && !this.isInNetwork) {
// If intranetInactivityDuration is not specified then dont logout user
if (!this.intranetInactivityDuration) {
return;
}
// If duration is set to none then don't logout web client.
if (this.intranetInactivityDuration && this.intranetInactivityDuration === -1) {
return;
}
// Setup a listener for last user activity change and call _resetLogoutTimer on change.
this.on('change:lastUserActivityDate', () => { this._resetLogoutTimer(); });
const timer = safeSetTimeout(() => {
// If there is no url specified logout user on timeout.
if (!this.intranetInactivityCheckUrl) {
this.webex.logout();
}
else {
// Else check url reachability to see if user is in network and set isInNetwork to true if reachable or logout.
this.webex.request({

@@ -608,33 +615,29 @@ headers: {

});
}, this.intranetInactivityDuration * 1000);
}
}, this.intranetInactivityDuration * 1000);
this.logoutTimer = timer;
}
this.logoutTimer = timer;
}
},
// In-Network logout timer
_inNetworkResetLogoutTimer() {
// Clear any previously set timers and listeners
clearTimeout(this.inNetworkLogoutTimer);
this.off('change:lastInNetworkUserActivityDate'); // removes previous event listener
this.unset('inNetworkLogoutTimer');
/**
* _inNetworkResetLogoutTimer
* Initially clears the timer and removes the onChange event listener for lastInNetworkUserActivityDate and unsets the timer
* Checks if the client is not in meeting
* Checks for the inactivityEnforcement, intranetInactivityCheckUrl, inNetworkInactivityDuration, also if
* inNetworkInactivityDuration isn't -1 which is the value set for duration option None/default value for the duration.
* It logs the user out on successful/unsuccessful ping of the url. This action is with the following point in mind,
* In-Network Duration is expected to be greater than the Off-Network so if the url turns out to be un-reachable its
* saft to log the user out.
*/
if (!this.isInMeeting) {
if (this.config.enableInactivityEnforcement &&
this.inNetworkInactivityDuration && this.inNetworkInactivityDuration !== -1) {
this.on('change:lastInNetworkUserActivityDate', () => { this._inNetworkResetLogoutTimer(); });
const inNetworkTimer = safeSetTimeout(() => {
this.webex.logout();
}, this.inNetworkInactivityDuration * 1000);
* Check if user is not in a meeting and not in network and if enableInactivityEnforcement is true
* Check if inNetworkInactivityDuration exists and is not set to -1 then setup the logout timer
* Else don't logout user.
* */
if (!this.isInMeeting && this.config.enableInactivityEnforcement &&
this.inNetworkInactivityDuration && this.inNetworkInactivityDuration !== -1) {
this.on('change:lastInNetworkUserActivityDate', () => { this._inNetworkResetLogoutTimer(); });
const inNetworkTimer = safeSetTimeout(() => {
this.webex.logout();
}, this.inNetworkInactivityDuration * 1000);
this.inNetworkLogoutTimer = inNetworkTimer;
}
this.inNetworkLogoutTimer = inNetworkTimer;
}

@@ -641,0 +644,0 @@ }

@@ -62,2 +62,4 @@ /*!

webex.internal.device.unset('inNetworkLogoutTimer');
webex.internal.device.unset('intranetInactivityDuration');
webex.internal.device.unset('inNetworkInactivityDuration');
assert.isUndefined(webex.internal.device.logoutTimer);

@@ -64,0 +66,0 @@ assert.isUndefined(webex.internal.device.inNetworkLogoutTimer);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc