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

nestjs-jwt2

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nestjs-jwt2 - npm Package Compare versions

Comparing version 1.0.2-beta to 1.0.3-beta

index.js.map

2

lib/services/jwt.service.d.ts
export declare class JwtService {
private readonly cert;
private readonly audiences;
private readonly issuers;
constructor();

@@ -4,0 +6,0 @@ validateToken(token: string): Promise<boolean>;

@@ -29,2 +29,10 @@ "use strict";

}
if (!process.env.JWT_AUDIENCES) {
throw new Error('You must provide JWT_AUDIENCES environment variable');
}
if (!process.env.JWT_ISSUER) {
throw new Error('You must provide JWT_ISSUER environment variable');
}
this.audiences = process.env.JWT_AUDIENCES.split(' ');
this.issuers = process.env.JWT_ISSUER.split(' ');
try {

@@ -39,3 +47,6 @@ this.cert = fs.readFileSync(certPath);

return new Promise((resolve, reject) => {
jwt.verify(token, this.cert, err => {
jwt.verify(token, this.cert, {
audience: this.audiences,
issuer: this.issuers
}, err => {
if (err) {

@@ -42,0 +53,0 @@ reject();

2

package.json
{
"name": "nestjs-jwt2",
"version": "1.0.2-beta",
"version": "1.0.3-beta",
"description": "Jwt utils for nestjs",

@@ -5,0 +5,0 @@ "author": "Julien Dufresne",

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