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

uport

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uport - npm Package Compare versions

Comparing version 0.1.1 to 0.1.3

dist/uport.js

3

lib/JWT.js

@@ -39,3 +39,4 @@ 'use strict';

if (!profile) return reject(new Error('No profile found, unable to verify JWT'));
var verifier = new _jsontokens.TokenVerifier('ES256K', profile.publicKey);
var publicKey = profile.publicKey.match(/^0x/) ? profile.publicKey.slice(2) : profile.publicKey;
var verifier = new _jsontokens.TokenVerifier('ES256K', publicKey);
if (verifier.verify(jwt)) {

@@ -42,0 +43,0 @@ if (payload.exp && payload.exp <= new Date().getTime()) {

{
"name": "uport",
"version": "0.1.1",
"version": "0.1.3",
"description": "Library for interacting with uport profiles and attestations",

@@ -14,3 +14,4 @@ "main": "lib/index.js",

"build:es5": "./node_modules/.bin/babel src -d lib",
"build": "yarn test && yarn build:es5"
"build:browser": "./node_modules/.bin/webpack --config webpack.config.js",
"build": "yarn test && yarn build:es5 && yarn build:browser"
},

@@ -31,2 +32,3 @@ "author": "Pelle Braendgaard <pelle.braendgaard@consensys.net>",

"babel-jest": "^18.0.0",
"babel-loader": "^6.2.10",
"babel-plugin-syntax-object-rest-spread": "^6.13.0",

@@ -39,4 +41,6 @@ "babel-plugin-transform-object-rest-spread": "^6.22.0",

"jest": "^18.1.0",
"mockdate": "^2.0.1"
"json-loader": "^0.5.4",
"mockdate": "^2.0.1",
"webpack": "^1.14.0"
}
}

@@ -24,3 +24,4 @@ import { createUnsignedToken, TokenVerifier, decodeToken } from 'jsontokens'

if (!profile) return reject(new Error('No profile found, unable to verify JWT'))
const verifier = new TokenVerifier('ES256K', profile.publicKey)
const publicKey = profile.publicKey.match(/^0x/) ? profile.publicKey.slice(2) : profile.publicKey
const verifier = new TokenVerifier('ES256K', publicKey)
if (verifier.verify(jwt)) {

@@ -27,0 +28,0 @@ if (payload.exp && payload.exp <= new Date().getTime()) {

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