{"library":"authorized","type":"library","category":null,"description":"Action-based authorization middleware for Express/Connect applications. Version 1.0.0 is stable with no recent releases. It provides role and entity getters to define fine-grained access control using a simple declarative syntax, and generates middleware to protect routes. Key differentiators: uses 'entity.relation' role syntax for resource-specific permissions, supports view helper for checking multiple actions, and integrates seamlessly with Express error handling.","language":"javascript","status":"active","version":"1.0.0","tags":["javascript","auth","authorization","security","roles","express","connect"],"last_verified":"Thu Jun 04","install":[{"cmd":"npm install authorized","imports":["const auth = require('authorized');","const UnauthorizedError = require('authorized').UnauthorizedError;","auth.role('admin', function(req, done) { done(null, !!req.user.admin); });","auth.entity('organization', function(req, done) { done(null, org); });","auth.can('add members to organization', 'delete organization');","const view = auth.view(req); view.has('admin'); view.can('add members');"]},{"cmd":"yarn add authorized","imports":[]},{"cmd":"pnpm add authorized","imports":[]}],"homepage":"https://github.com/tschaub/authorized","github":"https://github.com/tschaub/authorized","docs":null,"changelog":null,"pypi":null,"npm":"authorized","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}