{"library":"express-jwt-permissions","type":"library","category":null,"description":"Express JWT Permissions is an authorization middleware for Node.js applications, designed to work in conjunction with JWT authentication solutions like `express-jwt`. It inspects a decoded JWT token, typically found on `req.user` (or a configurable property), for a permissions array or a space-delimited scope string. The library, currently at stable version 1.3.7, has a moderate release cadence, primarily focusing on security updates, dependency bumps, and TypeScript typing enhancements. Its key differentiator lies in its flexible permission checking logic, supporting simple strings, arrays for AND logic, and nested arrays for complex OR logic combinations of permissions. It also provides configurable options for `requestProperty` and `permissionsProperty` to accommodate diverse JWT payload structures, moving beyond the default `req.user.permissions` pattern, and facilitates custom error handling for permission denials.","language":"javascript","status":"active","version":"1.3.7","tags":["javascript","express","middleware","JWT","permissions","authorization","token","security","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install express-jwt-permissions","imports":["import guardFactory from 'express-jwt-permissions';","import { GuardOptions } from 'express-jwt-permissions';","const guardFactory = require('express-jwt-permissions');"]},{"cmd":"yarn add express-jwt-permissions","imports":[]},{"cmd":"pnpm add express-jwt-permissions","imports":[]}],"homepage":null,"github":"https://github.com/MichielDeMey/express-jwt-permissions","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/express-jwt-permissions","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/express-jwt-permissions/compatibility"}}