UNPKG

authorization-z

Version:

`Authorization-Z` is a comprehensive Express middleware package for validating JWT Authorization-Z tokens, attaching permissions to requests, verifying permissions, and granting access accordingly. This package provides a robust solution for implementing

13 lines (12 loc) 365 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AppError = void 0; class AppError extends Error { constructor(message, statusCode) { super(message); this.statusCode = statusCode; this.isOperational = true; Error.captureStackTrace(this, this.constructor); } } exports.AppError = AppError;