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

@codefresh-io/authenticated-entity

Package Overview
Dependencies
Maintainers
15
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codefresh-io/authenticated-entity - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

.npmignore

7

lib/tests/User.unit.spec.js

@@ -185,3 +185,10 @@ 'use strict';

describe('Create hash string', () => {
it('Should create', () => {
const user = User.constructFromEncodedString(encodedFakeUser);
expect(user.generateHashString()).to.be.deep.equal('6959c12fb513a3d1cd47bf23a37153837972fae49936d1ab7c0c15236449f096');
});
});
});

9

lib/User.js
'use strict';
const _ = require('lodash');
const crypto = require('crypto');

@@ -82,2 +83,8 @@ const requiredParams = [

generateHashString() {
return crypto.createHash('sha256')
.update(this.encodeToBase64String())
.digest('hex');
}
encodeToBase64String() {

@@ -106,3 +113,3 @@ return Buffer.from(this.toString()).toString('base64');

}
getUserId() {

@@ -109,0 +116,0 @@ return this._user._id;

2

package.json
{
"name": "@codefresh-io/authenticated-entity",
"version": "1.2.0",
"version": "1.2.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

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