queueit-knownuser
Advanced tools
Comparing version 3.7.2 to 3.7.3
@@ -368,3 +368,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g=(g.QueueIT||(g.QueueIT = {}));g=(g.KnownUserV3||(g.KnownUserV3 = {}));g.SDK = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | ||
httpContextProvider.getHttpResponse().setCookie(this.QueueITDebugKey, cookieValue, null, QueueITHelpers_1.Utils.getCurrentTime() + 20 * 60, // now + 20 mins | ||
false, false, null); | ||
false, false); | ||
}; | ||
@@ -437,7 +437,7 @@ KnownUser._resolveQueueRequestByLocalConfig = function (targetUrl, queueitToken, queueConfig, customerId, secretKey, httpContextProvider, debugEntries, isDebug) { | ||
} | ||
var queueEventConfig = new Models_1.QueueEventConfig(matchedConfig.EventId, matchedConfig.LayoutName, matchedConfig.Culture, matchedConfig.QueueDomain, matchedConfig.ExtendCookieValidity, matchedConfig.CookieValidityMinute, matchedConfig.CookieDomain, matchedConfig.IsCookieHttpOnly, matchedConfig.IsCookieSecure, matchedConfig.CookieSameSiteValue, customerIntegrationInfo.Version, matchedConfig.Name); | ||
var queueEventConfig = new Models_1.QueueEventConfig(matchedConfig.EventId, matchedConfig.LayoutName, matchedConfig.Culture, matchedConfig.QueueDomain, matchedConfig.ExtendCookieValidity, matchedConfig.CookieValidityMinute, matchedConfig.CookieDomain, matchedConfig.IsCookieHttpOnly, matchedConfig.IsCookieSecure, customerIntegrationInfo.Version, matchedConfig.Name); | ||
return this._resolveQueueRequestByLocalConfig(targetUrl, queueitToken, queueEventConfig, customerId, secretKey, httpContextProvider, debugEntries, isDebug); | ||
}; | ||
KnownUser.handleCancelAction = function (currentUrlWithoutQueueITToken, queueitToken, customerIntegrationInfo, customerId, secretKey, matchedConfig, httpContextProvider, debugEntries, isDebug) { | ||
var cancelEventConfig = new Models_1.CancelEventConfig(matchedConfig.EventId, matchedConfig.QueueDomain, matchedConfig.CookieDomain, matchedConfig.IsCookieHttpOnly, matchedConfig.IsCookieSecure, matchedConfig.CookieSameSiteValue, customerIntegrationInfo.Version, matchedConfig.Name); | ||
var cancelEventConfig = new Models_1.CancelEventConfig(matchedConfig.EventId, matchedConfig.QueueDomain, matchedConfig.CookieDomain, matchedConfig.IsCookieHttpOnly, matchedConfig.IsCookieSecure, customerIntegrationInfo.Version, matchedConfig.Name); | ||
var targetUrl = this.generateTargetUrl(currentUrlWithoutQueueITToken, httpContextProvider); | ||
@@ -561,3 +561,3 @@ return this._cancelRequestByLocalConfig(targetUrl, queueitToken, cancelEventConfig, customerId, secretKey, httpContextProvider, debugEntries, isDebug); | ||
var QueueEventConfig = /** @class */ (function () { | ||
function QueueEventConfig(eventId, layoutName, culture, queueDomain, extendCookieValidity, cookieValidityMinute, cookieDomain, isCookieHttpOnly, isCookieSecure, cookieSameSiteValue, version, actionName) { | ||
function QueueEventConfig(eventId, layoutName, culture, queueDomain, extendCookieValidity, cookieValidityMinute, cookieDomain, isCookieHttpOnly, isCookieSecure, version, actionName) { | ||
if (actionName === void 0) { actionName = 'unspecified'; } | ||
@@ -573,3 +573,2 @@ this.eventId = eventId; | ||
this.isCookieSecure = isCookieSecure; | ||
this.cookieSameSiteValue = cookieSameSiteValue; | ||
this.version = version; | ||
@@ -581,3 +580,2 @@ this.actionName = actionName; | ||
("&CookieDomain:" + this.cookieDomain + "&IsCookieHttpOnly:" + this.isCookieHttpOnly + "&IsCookieSecure:" + this.isCookieSecure) + | ||
("&CookieSameSiteValue:" + this.cookieSameSiteValue) + | ||
("&ExtendCookieValidity:" + this.extendCookieValidity) + | ||
@@ -590,3 +588,3 @@ ("&CookieValidityMinute:" + this.cookieValidityMinute + "&LayoutName:" + this.layoutName + "&Culture:" + this.culture); | ||
var CancelEventConfig = /** @class */ (function () { | ||
function CancelEventConfig(eventId, queueDomain, cookieDomain, isCookieHttpOnly, isCookieSecure, cookieSameSiteValue, version, actionName) { | ||
function CancelEventConfig(eventId, queueDomain, cookieDomain, isCookieHttpOnly, isCookieSecure, version, actionName) { | ||
if (actionName === void 0) { actionName = 'unspecified'; } | ||
@@ -598,3 +596,2 @@ this.eventId = eventId; | ||
this.isCookieSecure = isCookieSecure; | ||
this.cookieSameSiteValue = cookieSameSiteValue; | ||
this.version = version; | ||
@@ -607,3 +604,2 @@ this.actionName = actionName; | ||
("&CookieDomain:" + this.cookieDomain + "&IsCookieHttpOnly:" + this.isCookieHttpOnly + "&IsCookieSecure:" + this.isCookieSecure) + | ||
("&CookieSameSiteValue:" + this.cookieSameSiteValue) + | ||
("&ActionName:" + this.actionName); | ||
@@ -853,3 +849,3 @@ }; | ||
UserInQueueService.prototype.getValidTokenResult = function (config, queueParams, secretKey) { | ||
this.userInQueueStateRepository.store(config.eventId, queueParams.queueId, queueParams.cookieValidityMinutes, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure, config.cookieSameSiteValue, queueParams.redirectType, secretKey); | ||
this.userInQueueStateRepository.store(config.eventId, queueParams.queueId, queueParams.cookieValidityMinutes, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure, queueParams.redirectType, secretKey); | ||
return new Models_1.RequestValidationResult(Models_1.ActionTypes.QueueAction, config.eventId, queueParams.queueId, null, queueParams.redirectType, config.actionName); | ||
@@ -894,3 +890,3 @@ }; | ||
if (state.isStateExtendable() && config.extendCookieValidity) { | ||
this.userInQueueStateRepository.store(config.eventId, state.queueId, null, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure, config.cookieSameSiteValue, state.redirectType, secretKey); | ||
this.userInQueueStateRepository.store(config.eventId, state.queueId, null, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure, state.redirectType, secretKey); | ||
} | ||
@@ -916,3 +912,3 @@ return new Models_1.RequestValidationResult(Models_1.ActionTypes.QueueAction, config.eventId, state.queueId, null, state.redirectType, config.actionName); | ||
if (state.isFound && !isTokenValid) { | ||
this.userInQueueStateRepository.cancelQueueCookie(config.eventId, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure, config.cookieSameSiteValue); | ||
this.userInQueueStateRepository.cancelQueueCookie(config.eventId, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure); | ||
} | ||
@@ -925,3 +921,3 @@ return requestValidationResult; | ||
if (state.isValid) { | ||
this.userInQueueStateRepository.cancelQueueCookie(config.eventId, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure, config.cookieSameSiteValue); | ||
this.userInQueueStateRepository.cancelQueueCookie(config.eventId, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure); | ||
var query = this.getQueryString(customerId, config.eventId, config.version, null, null, config.actionName) + | ||
@@ -963,3 +959,3 @@ (targetUrl ? "&r=" + QueueITHelpers_1.Utils.encodeUrl(targetUrl) : ""); | ||
}; | ||
UserInQueueService.SDK_VERSION = "v3-javascript-" + "3.7.2"; | ||
UserInQueueService.SDK_VERSION = "v3-javascript-" + "3.7.3"; | ||
return UserInQueueService; | ||
@@ -988,8 +984,8 @@ }()); | ||
}; | ||
UserInQueueStateCookieRepository.prototype.store = function (eventId, queueId, fixedCookieValidityMinutes, cookieDomain, isHttpOnly, isSecure, sameSiteValue, redirectType, secretKey) { | ||
UserInQueueStateCookieRepository.prototype.store = function (eventId, queueId, fixedCookieValidityMinutes, cookieDomain, isHttpOnly, isSecure, redirectType, secretKey) { | ||
isHttpOnly = isHttpOnly == null ? false : isHttpOnly; | ||
isSecure = isSecure == null ? false : isSecure; | ||
this.createCookie(eventId, queueId, fixedCookieValidityMinutes ? fixedCookieValidityMinutes.toString() : "", redirectType, cookieDomain, isHttpOnly, isSecure, sameSiteValue, secretKey); | ||
this.createCookie(eventId, queueId, fixedCookieValidityMinutes ? fixedCookieValidityMinutes.toString() : "", redirectType, cookieDomain, isHttpOnly, isSecure, secretKey); | ||
}; | ||
UserInQueueStateCookieRepository.prototype.createCookie = function (eventId, queueId, fixedCookieValidityMinutes, redirectType, cookieDomain, isHttpOnly, isSecure, sameSiteValue, secretKey) { | ||
UserInQueueStateCookieRepository.prototype.createCookie = function (eventId, queueId, fixedCookieValidityMinutes, redirectType, cookieDomain, isHttpOnly, isSecure, secretKey) { | ||
var cookieKey = UserInQueueStateCookieRepository.getCookieKey(eventId); | ||
@@ -1015,3 +1011,3 @@ var issueTime = QueueITHelpers_1.Utils.getCurrentTime().toString(); | ||
var expire = Math.floor(tomorrow.getTime() / 1000); | ||
this.httpContextProvider.getHttpResponse().setCookie(cookieKey, QueueITHelpers_1.CookieHelper.toValueFromKeyValueCollection(cookieValues), cookieDomain, expire, isHttpOnly, isSecure, sameSiteValue); | ||
this.httpContextProvider.getHttpResponse().setCookie(cookieKey, QueueITHelpers_1.CookieHelper.toValueFromKeyValueCollection(cookieValues), cookieDomain, expire, isHttpOnly, isSecure); | ||
}; | ||
@@ -1060,6 +1056,6 @@ UserInQueueStateCookieRepository.prototype.getState = function (eventId, cookieValidityMinutes, secretKey, validateTime) { | ||
}; | ||
UserInQueueStateCookieRepository.prototype.cancelQueueCookie = function (eventId, cookieDomain, isCookieHttpOnly, isSecure, sameSiteValue) { | ||
UserInQueueStateCookieRepository.prototype.cancelQueueCookie = function (eventId, cookieDomain, isCookieHttpOnly, isSecure) { | ||
var cookieKey = UserInQueueStateCookieRepository.getCookieKey(eventId); | ||
this.httpContextProvider.getHttpResponse() | ||
.setCookie(cookieKey, "", cookieDomain, 0, isCookieHttpOnly, isSecure, sameSiteValue); | ||
.setCookie(cookieKey, "", cookieDomain, 0, isCookieHttpOnly, isSecure); | ||
}; | ||
@@ -1077,3 +1073,3 @@ UserInQueueStateCookieRepository.prototype.reissueQueueCookie = function (eventId, cookieValidityMinutes, cookieDomain, secretKey) { | ||
fixedCookieValidityMinutes = cookieValues[UserInQueueStateCookieRepository._FixedCookieValidityMinutesKey].toString(); | ||
this.createCookie(eventId, cookieValues[UserInQueueStateCookieRepository._QueueIdKey], fixedCookieValidityMinutes, cookieValues[UserInQueueStateCookieRepository._RedirectTypeKey], cookieDomain, cookieValues[UserInQueueStateCookieRepository._IsCookieHttpOnly], cookieValues[UserInQueueStateCookieRepository._IsCookieSecure], cookieValues[UserInQueueStateCookieRepository._CookieSameSiteValue], secretKey); | ||
this.createCookie(eventId, cookieValues[UserInQueueStateCookieRepository._QueueIdKey], fixedCookieValidityMinutes, cookieValues[UserInQueueStateCookieRepository._RedirectTypeKey], cookieDomain, cookieValues[UserInQueueStateCookieRepository._IsCookieHttpOnly], cookieValues[UserInQueueStateCookieRepository._IsCookieSecure], secretKey); | ||
}; | ||
@@ -1093,3 +1089,2 @@ UserInQueueStateCookieRepository.prototype.generateHash = function (eventId, queueId, fixedCookieValidityMinutes, redirectType, issueTime, secretKey) { | ||
UserInQueueStateCookieRepository._IsCookieSecure = "IsCookieSecure"; | ||
UserInQueueStateCookieRepository._CookieSameSiteValue = "CookieSameSiteValue"; | ||
return UserInQueueStateCookieRepository; | ||
@@ -1096,0 +1091,0 @@ }()); |
@@ -10,3 +10,3 @@ export interface IHttpRequest { | ||
export interface IHttpResponse { | ||
setCookie(cookieName: string, cookieValue: string, domain: string, expiration: number, httpOnly: boolean, isSecure: boolean, sameSiteValue: string): any; | ||
setCookie(cookieName: string, cookieValue: string, domain: string, expiration: number, httpOnly: boolean, isSecure: boolean): any; | ||
} | ||
@@ -13,0 +13,0 @@ export interface IHttpContextProvider { |
@@ -7,3 +7,2 @@ export declare class IntegrationConfigModel { | ||
IsCookieSecure: boolean; | ||
CookieSameSiteValue: string | null; | ||
LayoutName: string; | ||
@@ -10,0 +9,0 @@ Culture: string; |
@@ -65,3 +65,3 @@ "use strict"; | ||
httpContextProvider.getHttpResponse().setCookie(this.QueueITDebugKey, cookieValue, null, QueueITHelpers_1.Utils.getCurrentTime() + 20 * 60, // now + 20 mins | ||
false, false, null); | ||
false, false); | ||
}; | ||
@@ -134,7 +134,7 @@ KnownUser._resolveQueueRequestByLocalConfig = function (targetUrl, queueitToken, queueConfig, customerId, secretKey, httpContextProvider, debugEntries, isDebug) { | ||
} | ||
var queueEventConfig = new Models_1.QueueEventConfig(matchedConfig.EventId, matchedConfig.LayoutName, matchedConfig.Culture, matchedConfig.QueueDomain, matchedConfig.ExtendCookieValidity, matchedConfig.CookieValidityMinute, matchedConfig.CookieDomain, matchedConfig.IsCookieHttpOnly, matchedConfig.IsCookieSecure, matchedConfig.CookieSameSiteValue, customerIntegrationInfo.Version, matchedConfig.Name); | ||
var queueEventConfig = new Models_1.QueueEventConfig(matchedConfig.EventId, matchedConfig.LayoutName, matchedConfig.Culture, matchedConfig.QueueDomain, matchedConfig.ExtendCookieValidity, matchedConfig.CookieValidityMinute, matchedConfig.CookieDomain, matchedConfig.IsCookieHttpOnly, matchedConfig.IsCookieSecure, customerIntegrationInfo.Version, matchedConfig.Name); | ||
return this._resolveQueueRequestByLocalConfig(targetUrl, queueitToken, queueEventConfig, customerId, secretKey, httpContextProvider, debugEntries, isDebug); | ||
}; | ||
KnownUser.handleCancelAction = function (currentUrlWithoutQueueITToken, queueitToken, customerIntegrationInfo, customerId, secretKey, matchedConfig, httpContextProvider, debugEntries, isDebug) { | ||
var cancelEventConfig = new Models_1.CancelEventConfig(matchedConfig.EventId, matchedConfig.QueueDomain, matchedConfig.CookieDomain, matchedConfig.IsCookieHttpOnly, matchedConfig.IsCookieSecure, matchedConfig.CookieSameSiteValue, customerIntegrationInfo.Version, matchedConfig.Name); | ||
var cancelEventConfig = new Models_1.CancelEventConfig(matchedConfig.EventId, matchedConfig.QueueDomain, matchedConfig.CookieDomain, matchedConfig.IsCookieHttpOnly, matchedConfig.IsCookieSecure, customerIntegrationInfo.Version, matchedConfig.Name); | ||
var targetUrl = this.generateTargetUrl(currentUrlWithoutQueueITToken, httpContextProvider); | ||
@@ -141,0 +141,0 @@ return this._cancelRequestByLocalConfig(targetUrl, queueitToken, cancelEventConfig, customerId, secretKey, httpContextProvider, debugEntries, isDebug); |
@@ -11,6 +11,5 @@ export declare class QueueEventConfig { | ||
isCookieSecure: boolean; | ||
cookieSameSiteValue: string; | ||
version: number; | ||
actionName: string; | ||
constructor(eventId: string, layoutName: string, culture: string, queueDomain: string, extendCookieValidity: boolean, cookieValidityMinute: number, cookieDomain: string, isCookieHttpOnly: boolean, isCookieSecure: boolean, cookieSameSiteValue: string, version: number, actionName?: string); | ||
constructor(eventId: string, layoutName: string, culture: string, queueDomain: string, extendCookieValidity: boolean, cookieValidityMinute: number, cookieDomain: string, isCookieHttpOnly: boolean, isCookieSecure: boolean, version: number, actionName?: string); | ||
getString(): string; | ||
@@ -24,6 +23,5 @@ } | ||
isCookieSecure: boolean; | ||
cookieSameSiteValue: string; | ||
version: number; | ||
actionName: string; | ||
constructor(eventId: string, queueDomain: string, cookieDomain: string, isCookieHttpOnly: boolean, isCookieSecure: boolean, cookieSameSiteValue: string, version: number, actionName?: string); | ||
constructor(eventId: string, queueDomain: string, cookieDomain: string, isCookieHttpOnly: boolean, isCookieSecure: boolean, version: number, actionName?: string); | ||
getString(): string; | ||
@@ -30,0 +28,0 @@ } |
@@ -6,3 +6,3 @@ "use strict"; | ||
var QueueEventConfig = /** @class */ (function () { | ||
function QueueEventConfig(eventId, layoutName, culture, queueDomain, extendCookieValidity, cookieValidityMinute, cookieDomain, isCookieHttpOnly, isCookieSecure, cookieSameSiteValue, version, actionName) { | ||
function QueueEventConfig(eventId, layoutName, culture, queueDomain, extendCookieValidity, cookieValidityMinute, cookieDomain, isCookieHttpOnly, isCookieSecure, version, actionName) { | ||
if (actionName === void 0) { actionName = 'unspecified'; } | ||
@@ -18,3 +18,2 @@ this.eventId = eventId; | ||
this.isCookieSecure = isCookieSecure; | ||
this.cookieSameSiteValue = cookieSameSiteValue; | ||
this.version = version; | ||
@@ -26,3 +25,2 @@ this.actionName = actionName; | ||
("&CookieDomain:" + this.cookieDomain + "&IsCookieHttpOnly:" + this.isCookieHttpOnly + "&IsCookieSecure:" + this.isCookieSecure) + | ||
("&CookieSameSiteValue:" + this.cookieSameSiteValue) + | ||
("&ExtendCookieValidity:" + this.extendCookieValidity) + | ||
@@ -35,3 +33,3 @@ ("&CookieValidityMinute:" + this.cookieValidityMinute + "&LayoutName:" + this.layoutName + "&Culture:" + this.culture); | ||
var CancelEventConfig = /** @class */ (function () { | ||
function CancelEventConfig(eventId, queueDomain, cookieDomain, isCookieHttpOnly, isCookieSecure, cookieSameSiteValue, version, actionName) { | ||
function CancelEventConfig(eventId, queueDomain, cookieDomain, isCookieHttpOnly, isCookieSecure, version, actionName) { | ||
if (actionName === void 0) { actionName = 'unspecified'; } | ||
@@ -43,3 +41,2 @@ this.eventId = eventId; | ||
this.isCookieSecure = isCookieSecure; | ||
this.cookieSameSiteValue = cookieSameSiteValue; | ||
this.version = version; | ||
@@ -52,3 +49,2 @@ this.actionName = actionName; | ||
("&CookieDomain:" + this.cookieDomain + "&IsCookieHttpOnly:" + this.isCookieHttpOnly + "&IsCookieSecure:" + this.isCookieSecure) + | ||
("&CookieSameSiteValue:" + this.cookieSameSiteValue) + | ||
("&ActionName:" + this.actionName); | ||
@@ -55,0 +51,0 @@ }; |
@@ -12,3 +12,3 @@ "use strict"; | ||
UserInQueueService.prototype.getValidTokenResult = function (config, queueParams, secretKey) { | ||
this.userInQueueStateRepository.store(config.eventId, queueParams.queueId, queueParams.cookieValidityMinutes, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure, config.cookieSameSiteValue, queueParams.redirectType, secretKey); | ||
this.userInQueueStateRepository.store(config.eventId, queueParams.queueId, queueParams.cookieValidityMinutes, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure, queueParams.redirectType, secretKey); | ||
return new Models_1.RequestValidationResult(Models_1.ActionTypes.QueueAction, config.eventId, queueParams.queueId, null, queueParams.redirectType, config.actionName); | ||
@@ -53,3 +53,3 @@ }; | ||
if (state.isStateExtendable() && config.extendCookieValidity) { | ||
this.userInQueueStateRepository.store(config.eventId, state.queueId, null, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure, config.cookieSameSiteValue, state.redirectType, secretKey); | ||
this.userInQueueStateRepository.store(config.eventId, state.queueId, null, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure, state.redirectType, secretKey); | ||
} | ||
@@ -75,3 +75,3 @@ return new Models_1.RequestValidationResult(Models_1.ActionTypes.QueueAction, config.eventId, state.queueId, null, state.redirectType, config.actionName); | ||
if (state.isFound && !isTokenValid) { | ||
this.userInQueueStateRepository.cancelQueueCookie(config.eventId, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure, config.cookieSameSiteValue); | ||
this.userInQueueStateRepository.cancelQueueCookie(config.eventId, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure); | ||
} | ||
@@ -84,3 +84,3 @@ return requestValidationResult; | ||
if (state.isValid) { | ||
this.userInQueueStateRepository.cancelQueueCookie(config.eventId, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure, config.cookieSameSiteValue); | ||
this.userInQueueStateRepository.cancelQueueCookie(config.eventId, config.cookieDomain, config.isCookieHttpOnly, config.isCookieSecure); | ||
var query = this.getQueryString(customerId, config.eventId, config.version, null, null, config.actionName) + | ||
@@ -122,3 +122,3 @@ (targetUrl ? "&r=" + QueueITHelpers_1.Utils.encodeUrl(targetUrl) : ""); | ||
}; | ||
UserInQueueService.SDK_VERSION = "v3-javascript-" + "3.7.2"; | ||
UserInQueueService.SDK_VERSION = "v3-javascript-" + "3.7.3"; | ||
return UserInQueueService; | ||
@@ -125,0 +125,0 @@ }()); |
@@ -13,10 +13,9 @@ import { IHttpContextProvider } from './HttpContextProvider'; | ||
private static readonly _IsCookieSecure; | ||
private static readonly _CookieSameSiteValue; | ||
constructor(httpContextProvider: IHttpContextProvider); | ||
static getCookieKey(eventId: string): string; | ||
store(eventId: string, queueId: string, fixedCookieValidityMinutes: number | null, cookieDomain: string, isHttpOnly: boolean, isSecure: boolean, sameSiteValue: string, redirectType: string, secretKey: string): void; | ||
store(eventId: string, queueId: string, fixedCookieValidityMinutes: number | null, cookieDomain: string, isHttpOnly: boolean, isSecure: boolean, redirectType: string, secretKey: string): void; | ||
private createCookie; | ||
getState(eventId: string, cookieValidityMinutes: number, secretKey: string, validateTime: boolean): StateInfo; | ||
private isCookieValid; | ||
cancelQueueCookie(eventId: string, cookieDomain: string, isCookieHttpOnly: boolean, isSecure: boolean, sameSiteValue: string): void; | ||
cancelQueueCookie(eventId: string, cookieDomain: string, isCookieHttpOnly: boolean, isSecure: boolean): void; | ||
reissueQueueCookie(eventId: string, cookieValidityMinutes: number, cookieDomain: string, secretKey: string): void; | ||
@@ -23,0 +22,0 @@ private generateHash; |
@@ -12,8 +12,8 @@ "use strict"; | ||
}; | ||
UserInQueueStateCookieRepository.prototype.store = function (eventId, queueId, fixedCookieValidityMinutes, cookieDomain, isHttpOnly, isSecure, sameSiteValue, redirectType, secretKey) { | ||
UserInQueueStateCookieRepository.prototype.store = function (eventId, queueId, fixedCookieValidityMinutes, cookieDomain, isHttpOnly, isSecure, redirectType, secretKey) { | ||
isHttpOnly = isHttpOnly == null ? false : isHttpOnly; | ||
isSecure = isSecure == null ? false : isSecure; | ||
this.createCookie(eventId, queueId, fixedCookieValidityMinutes ? fixedCookieValidityMinutes.toString() : "", redirectType, cookieDomain, isHttpOnly, isSecure, sameSiteValue, secretKey); | ||
this.createCookie(eventId, queueId, fixedCookieValidityMinutes ? fixedCookieValidityMinutes.toString() : "", redirectType, cookieDomain, isHttpOnly, isSecure, secretKey); | ||
}; | ||
UserInQueueStateCookieRepository.prototype.createCookie = function (eventId, queueId, fixedCookieValidityMinutes, redirectType, cookieDomain, isHttpOnly, isSecure, sameSiteValue, secretKey) { | ||
UserInQueueStateCookieRepository.prototype.createCookie = function (eventId, queueId, fixedCookieValidityMinutes, redirectType, cookieDomain, isHttpOnly, isSecure, secretKey) { | ||
var cookieKey = UserInQueueStateCookieRepository.getCookieKey(eventId); | ||
@@ -39,3 +39,3 @@ var issueTime = QueueITHelpers_1.Utils.getCurrentTime().toString(); | ||
var expire = Math.floor(tomorrow.getTime() / 1000); | ||
this.httpContextProvider.getHttpResponse().setCookie(cookieKey, QueueITHelpers_1.CookieHelper.toValueFromKeyValueCollection(cookieValues), cookieDomain, expire, isHttpOnly, isSecure, sameSiteValue); | ||
this.httpContextProvider.getHttpResponse().setCookie(cookieKey, QueueITHelpers_1.CookieHelper.toValueFromKeyValueCollection(cookieValues), cookieDomain, expire, isHttpOnly, isSecure); | ||
}; | ||
@@ -84,6 +84,6 @@ UserInQueueStateCookieRepository.prototype.getState = function (eventId, cookieValidityMinutes, secretKey, validateTime) { | ||
}; | ||
UserInQueueStateCookieRepository.prototype.cancelQueueCookie = function (eventId, cookieDomain, isCookieHttpOnly, isSecure, sameSiteValue) { | ||
UserInQueueStateCookieRepository.prototype.cancelQueueCookie = function (eventId, cookieDomain, isCookieHttpOnly, isSecure) { | ||
var cookieKey = UserInQueueStateCookieRepository.getCookieKey(eventId); | ||
this.httpContextProvider.getHttpResponse() | ||
.setCookie(cookieKey, "", cookieDomain, 0, isCookieHttpOnly, isSecure, sameSiteValue); | ||
.setCookie(cookieKey, "", cookieDomain, 0, isCookieHttpOnly, isSecure); | ||
}; | ||
@@ -101,3 +101,3 @@ UserInQueueStateCookieRepository.prototype.reissueQueueCookie = function (eventId, cookieValidityMinutes, cookieDomain, secretKey) { | ||
fixedCookieValidityMinutes = cookieValues[UserInQueueStateCookieRepository._FixedCookieValidityMinutesKey].toString(); | ||
this.createCookie(eventId, cookieValues[UserInQueueStateCookieRepository._QueueIdKey], fixedCookieValidityMinutes, cookieValues[UserInQueueStateCookieRepository._RedirectTypeKey], cookieDomain, cookieValues[UserInQueueStateCookieRepository._IsCookieHttpOnly], cookieValues[UserInQueueStateCookieRepository._IsCookieSecure], cookieValues[UserInQueueStateCookieRepository._CookieSameSiteValue], secretKey); | ||
this.createCookie(eventId, cookieValues[UserInQueueStateCookieRepository._QueueIdKey], fixedCookieValidityMinutes, cookieValues[UserInQueueStateCookieRepository._RedirectTypeKey], cookieDomain, cookieValues[UserInQueueStateCookieRepository._IsCookieHttpOnly], cookieValues[UserInQueueStateCookieRepository._IsCookieSecure], secretKey); | ||
}; | ||
@@ -117,3 +117,2 @@ UserInQueueStateCookieRepository.prototype.generateHash = function (eventId, queueId, fixedCookieValidityMinutes, redirectType, issueTime, secretKey) { | ||
UserInQueueStateCookieRepository._IsCookieSecure = "IsCookieSecure"; | ||
UserInQueueStateCookieRepository._CookieSameSiteValue = "CookieSameSiteValue"; | ||
return UserInQueueStateCookieRepository; | ||
@@ -120,0 +119,0 @@ }()); |
{ | ||
"name": "queueit-knownuser", | ||
"version": "3.7.2", | ||
"version": "3.7.3", | ||
"description": "SDK to integrate Queue-it into a javascript based server side application.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
237190
3612