Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

queueit-knownuser

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

queueit-knownuser - npm Package Compare versions

Comparing version 3.7.0 to 3.7.1

dist/queueitknownuser.bundle.js

17

dist/browserified.js

@@ -336,3 +336,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){

if (!this.UserInQueueService) {
return new UserInQueueService_1.UserInQueueService(new UserInQueueStateCookieRepository_1.UserInQueueStateCookieRepository(httpContextProvider));
return new UserInQueueService_1.UserInQueueService(httpContextProvider, new UserInQueueStateCookieRepository_1.UserInQueueStateCookieRepository(httpContextProvider));
}

@@ -740,2 +740,5 @@ return this.UserInQueueService;

break;
case QueueParameterHelper.HashedIPKey:
result.hashedIp = keyValueArr[1] || "";
break;
}

@@ -754,2 +757,3 @@ }

QueueParameterHelper.RedirectTypeKey = "rt";
QueueParameterHelper.HashedIPKey = 'hip';
QueueParameterHelper.KeyValueSeparatorChar = '_';

@@ -839,3 +843,4 @@ QueueParameterHelper.KeyValueSeparatorGroupChar = '~';

var UserInQueueService = /** @class */ (function () {
function UserInQueueService(userInQueueStateRepository) {
function UserInQueueService(httpContextProvider, userInQueueStateRepository) {
this.httpContextProvider = httpContextProvider;
this.userInQueueStateRepository = userInQueueStateRepository;

@@ -941,5 +946,11 @@ }

return new TokenValidationResult(false, "timestamp");
if (queueParams.hashedIp) {
var hashedIp = QueueITHelpers_1.Utils.generateSHA256Hash(secretKey, this.httpContextProvider.getHttpRequest().getUserHostAddress());
if (hashedIp !== queueParams.hashedIp) {
return new TokenValidationResult(false, "ip");
}
}
return new TokenValidationResult(true, null);
};
UserInQueueService.SDK_VERSION = "v3-javascript-" + "3.7.0";
UserInQueueService.SDK_VERSION = "v3-javascript-" + "3.7.1";
return UserInQueueService;

@@ -946,0 +957,0 @@ }());

2

dist/KnownUser.js

@@ -33,3 +33,3 @@ "use strict";

if (!this.UserInQueueService) {
return new UserInQueueService_1.UserInQueueService(new UserInQueueStateCookieRepository_1.UserInQueueStateCookieRepository(httpContextProvider));
return new UserInQueueService_1.UserInQueueService(httpContextProvider, new UserInQueueStateCookieRepository_1.UserInQueueStateCookieRepository(httpContextProvider));
}

@@ -36,0 +36,0 @@ return this.UserInQueueService;

@@ -19,2 +19,3 @@ import { RequestValidationResult } from './Models';

redirectType: string;
hashedIp: string;
}

@@ -29,2 +30,3 @@ export declare class QueueParameterHelper {

static readonly RedirectTypeKey = "rt";
static readonly HashedIPKey = "hip";
static readonly KeyValueSeparatorChar = "_";

@@ -31,0 +33,0 @@ static readonly KeyValueSeparatorGroupChar = "~";

@@ -92,2 +92,5 @@ "use strict";

break;
case QueueParameterHelper.HashedIPKey:
result.hashedIp = keyValueArr[1] || "";
break;
}

@@ -106,2 +109,3 @@ }

QueueParameterHelper.RedirectTypeKey = "rt";
QueueParameterHelper.HashedIPKey = 'hip';
QueueParameterHelper.KeyValueSeparatorChar = '_';

@@ -108,0 +112,0 @@ QueueParameterHelper.KeyValueSeparatorGroupChar = '~';

import { RequestValidationResult, QueueEventConfig, CancelEventConfig } from './Models';
import { UserInQueueStateCookieRepository } from './UserInQueueStateCookieRepository';
import { IHttpContextProvider } from './HttpContextProvider';
export declare class UserInQueueService {
private httpContextProvider;
private userInQueueStateRepository;
static readonly SDK_VERSION: string;
constructor(userInQueueStateRepository: UserInQueueStateCookieRepository);
constructor(httpContextProvider: IHttpContextProvider, userInQueueStateRepository: UserInQueueStateCookieRepository);
private getValidTokenResult;

@@ -8,0 +10,0 @@ private getErrorResult;

@@ -7,3 +7,4 @@ "use strict";

var UserInQueueService = /** @class */ (function () {
function UserInQueueService(userInQueueStateRepository) {
function UserInQueueService(httpContextProvider, userInQueueStateRepository) {
this.httpContextProvider = httpContextProvider;
this.userInQueueStateRepository = userInQueueStateRepository;

@@ -109,5 +110,11 @@ }

return new TokenValidationResult(false, "timestamp");
if (queueParams.hashedIp) {
var hashedIp = QueueITHelpers_1.Utils.generateSHA256Hash(secretKey, this.httpContextProvider.getHttpRequest().getUserHostAddress());
if (hashedIp !== queueParams.hashedIp) {
return new TokenValidationResult(false, "ip");
}
}
return new TokenValidationResult(true, null);
};
UserInQueueService.SDK_VERSION = "v3-javascript-" + "3.7.0";
UserInQueueService.SDK_VERSION = "v3-javascript-" + "3.7.1";
return UserInQueueService;

@@ -114,0 +121,0 @@ }());

{
"name": "queueit-knownuser",
"version": "3.7.0",
"version": "3.7.1",
"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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc