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

@vonage/jwt

Package Overview
Dependencies
Maintainers
45
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vonage/jwt - npm Package Compare versions

Comparing version 1.5.0 to 1.6.0

1

dist/index.d.ts

@@ -8,1 +8,2 @@ /// <reference types="node" />

export declare function tokenGenerate(applicationId: string, privateKey: string | Buffer, opts?: GeneratorOptions): string;
export declare function verifySignature(token: string, privateKey: string | Buffer): boolean;

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.tokenGenerate = exports.JWT = void 0;
exports.verifySignature = exports.tokenGenerate = exports.JWT = void 0;
const jwt_1 = require("./jwt");

@@ -28,2 +28,6 @@ Object.defineProperty(exports, "JWT", { enumerable: true, get: function () { return jwt_1.JWT; } });

exports.tokenGenerate = tokenGenerate;
function verifySignature(token, privateKey) {
return instance.verifySignature(token, privateKey);
}
exports.verifySignature = verifySignature;
//# sourceMappingURL=index.js.map

@@ -5,3 +5,4 @@ /// <reference types="node" />

tokenGenerate(applicationId: string, privateKey: string | Buffer, opts?: GeneratorOptions): string;
verifySignature(jwt: string, privateKey: string | Buffer): boolean;
private validateOptions;
}

@@ -36,2 +36,14 @@ "use strict";

}
verifySignature(jwt, privateKey) {
try {
(0, jsonwebtoken_1.verify)(jwt, privateKey, {
algorithms: ['RS256'],
});
return true;
}
catch (error) {
log('Error when verifying token', error);
}
return false;
}
validateOptions(opts) {

@@ -38,0 +50,0 @@ const now = parseInt((Date.now() / 1000).toString(), 10);

2

package.json
{
"name": "@vonage/jwt",
"version": "1.5.0",
"version": "1.6.0",
"description": "Vonage JWT package. Creates JWT tokens for Vonage API's",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/vonage/vonage-node-sdk/tree/master/packages/jwt#readme",

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