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

create-express-auth-middleware

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-express-auth-middleware - npm Package Compare versions

Comparing version 1.1.1 to 1.5.0

3

dist/auth.d.ts

@@ -0,3 +1,4 @@

/// <reference types="qs" />
import type { Request, RequestHandler } from "express";
export declare const create_factory: (defaultErrorMsg: string, authFailedStatus: number) => (predicate: (req: Request) => any, { errorJSON, errorMessage, errorHandler, }?: {
export declare const create_factory: <DefaultRequestType extends Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> = Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>>(defaultErrorMsg: string, authFailedStatus: number) => <CustomRequestType extends Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> = DefaultRequestType>(predicate: (req: CustomRequestType) => any, { errorJSON, errorMessage, errorHandler, }?: {
errorJSON?: object;

@@ -4,0 +5,0 @@ errorMessage?: (err: Error) => string;

@@ -1,2 +0,4 @@

export declare const create_authn_middleware: (predicate: (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>) => any, { errorJSON, errorMessage, errorHandler, }?: {
/// <reference types="qs" />
/// <reference types="express" />
export declare const create_authn_middleware: <CustomRequestType extends import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> = import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>>(predicate: (req: CustomRequestType) => any, { errorJSON, errorMessage, errorHandler, }?: {
errorJSON?: object;

@@ -3,0 +5,0 @@ errorMessage?: (err: Error) => string;

@@ -1,2 +0,4 @@

export declare const create_authz_middleware: (predicate: (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>) => any, { errorJSON, errorMessage, errorHandler, }?: {
/// <reference types="qs" />
/// <reference types="express" />
export declare const create_authz_middleware: <CustomRequestType extends import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> = import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>>(predicate: (req: CustomRequestType) => any, { errorJSON, errorMessage, errorHandler, }?: {
errorJSON?: object;

@@ -3,0 +5,0 @@ errorMessage?: (err: Error) => string;

@@ -5,2 +5,2 @@ "use strict";

const auth_1 = require("./auth");
exports.create_authz_middleware = (0, auth_1.create_factory)("Authorization Failed", 401);
exports.create_authz_middleware = (0, auth_1.create_factory)("Authorization Failed", 403);

@@ -0,2 +1,3 @@

export * from "./auth";
export * from "./authn";
export * from "./authz";

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

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./auth"), exports);
__exportStar(require("./authn"), exports);
__exportStar(require("./authz"), exports);
{
"name": "create-express-auth-middleware",
"description": "Library to create Express JS authentication and authorization middlewares",
"version": "1.1.1",
"version": "1.5.0",
"main": "./dist/index.js",

@@ -6,0 +6,0 @@ "types": "./dist",

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