New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nodecommons-security

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodecommons-security - npm Package Compare versions

Comparing version 3.0.2 to 3.1.0

2

dist/services/commons-user-pw-hash-session.service.d.ts

@@ -6,5 +6,5 @@ import { ICommonsSession } from 'tscommons-session';

private pepper?;
constructor(pepper?: string | undefined, allowMultipleSessionsForSameUser?: boolean);
constructor(pepper?: string | undefined, allowMultipleSessionsForSameUser?: boolean, isEqualSubCheck?: (a: T, b: T) => boolean);
generatePwHash(pw: string, salt: string): string;
authenticateWithPwHash(user: T, pw: string): ICommonsSession<T> | undefined;
}

@@ -6,4 +6,4 @@ "use strict";

class CommonsUserPwHashSessionService extends commons_user_session_service_1.CommonsUserSessionService {
constructor(pepper, allowMultipleSessionsForSameUser = false) {
super(allowMultipleSessionsForSameUser);
constructor(pepper, allowMultipleSessionsForSameUser = false, isEqualSubCheck) {
super(allowMultipleSessionsForSameUser, isEqualSubCheck);
this.pepper = pepper;

@@ -10,0 +10,0 @@ }

@@ -5,3 +5,4 @@ import { ICommonsSession } from 'tscommons-session';

export declare abstract class CommonsUserSessionService<T extends ICommonsUser> extends CommonsSessionService<T> {
constructor(allowMultipleSessionsForSameUser?: boolean);
private isEqualSubCheck?;
constructor(allowMultipleSessionsForSameUser?: boolean, isEqualSubCheck?: ((a: T, b: T) => boolean) | undefined);
protected isEqual(a: T, b: T): boolean;

@@ -8,0 +9,0 @@ protected isStillValid(user: T): Promise<boolean>;

@@ -14,10 +14,11 @@ "use strict";

class CommonsUserSessionService extends commons_session_service_1.CommonsSessionService {
constructor(allowMultipleSessionsForSameUser = false) {
constructor(allowMultipleSessionsForSameUser = false, isEqualSubCheck) {
super(allowMultipleSessionsForSameUser);
this.isEqualSubCheck = isEqualSubCheck;
}
isEqual(a, b) {
if (a.namespace !== b.namespace)
return false;
if (a.username !== b.username)
return false;
if (this.isEqualSubCheck && !this.isEqualSubCheck(a, b))
return false;
return true;

@@ -24,0 +25,0 @@ }

{
"name": "nodecommons-security",
"version": "3.0.2",
"version": "3.1.0",
"description": "",

@@ -14,4 +14,4 @@ "scripts": {

"@types/node": "^13.13.4",
"tscommons-core": "^2.0.0",
"tscommons-session": "0.0.5"
"tscommons-core": "^2.4.1",
"tscommons-session": "1.0.0"
},

@@ -18,0 +18,0 @@ "files": [

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