Socket
Socket
Sign inDemoInstall

express-jwt

Package Overview
Dependencies
19
Maintainers
0
Versions
71
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.7.7 to 7.7.8

4

dist/errors/UnauthorizedError.d.ts

@@ -1,5 +0,5 @@

export declare type ErrorLike = Error | {
export type ErrorLike = Error | {
message: string;
};
declare type ErrorCode = 'credentials_bad_scheme' | 'credentials_bad_format' | 'credentials_required' | 'invalid_token' | 'revoked_token';
type ErrorCode = 'credentials_bad_scheme' | 'credentials_bad_format' | 'credentials_required' | 'invalid_token' | 'revoked_token';
export declare class UnauthorizedError extends Error {

@@ -6,0 +6,0 @@ readonly status: number;

@@ -7,20 +7,20 @@ import * as jwt from 'jsonwebtoken';

*/
export declare type GetVerificationKey = (req: express.Request, token: jwt.Jwt | undefined) => jwt.Secret | Promise<jwt.Secret>;
export type GetVerificationKey = (req: express.Request, token: jwt.Jwt | undefined) => jwt.Secret | Promise<jwt.Secret>;
/**
* @deprecated use GetVerificationKey
*/
export declare type SecretCallback = GetVerificationKey;
export type SecretCallback = GetVerificationKey;
/**
* @deprecated use GetVerificationKey
*/
export declare type SecretCallbackLong = GetVerificationKey;
export type SecretCallbackLong = GetVerificationKey;
/**
* A function to check if a token is revoked
*/
export declare type IsRevoked = (req: express.Request, token: jwt.Jwt | undefined) => boolean | Promise<boolean>;
export type IsRevoked = (req: express.Request, token: jwt.Jwt | undefined) => boolean | Promise<boolean>;
/**
* A function to customize how a token is retrieved from the express request.
*/
export declare type TokenGetter = (req: express.Request) => string | Promise<string> | undefined;
declare type Params = {
export type TokenGetter = (req: express.Request) => string | Promise<string> | undefined;
type Params = {
/**

@@ -60,3 +60,3 @@ * The Key or a function to retrieve the key used to verify the JWT.

*/
export declare type ExpressJwtRequest<T = jwt.JwtPayload> = express.Request & {
export type ExpressJwtRequest<T = jwt.JwtPayload> = express.Request & {
auth: T;

@@ -67,3 +67,3 @@ };

*/
export declare type ExpressJwtRequestUnrequired<T = jwt.JwtPayload> = express.Request & {
export type ExpressJwtRequestUnrequired<T = jwt.JwtPayload> = express.Request & {
auth?: T;

@@ -74,3 +74,3 @@ };

*/
export declare type Request<T = jwt.JwtPayload> = express.Request & {
export type Request<T = jwt.JwtPayload> = express.Request & {
auth?: T;

@@ -77,0 +77,0 @@ };

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

if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -20,0 +20,0 @@ if (y = 0, t) op = [op[0] & 2, t.value];

{
"name": "express-jwt",
"version": "7.7.7",
"version": "7.7.8",
"description": "JWT authentication middleware.",

@@ -38,3 +38,3 @@ "keywords": [

"express-unless": "^2.1.3",
"jsonwebtoken": "^8.5.1"
"jsonwebtoken": "^9.0.2"
},

@@ -41,0 +41,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc