create-express-auth-middleware
Advanced tools
Comparing version 1.1.1 to 1.5.0
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10210
86