This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

extended-router-acl
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Extended Router ACL

Resource based Express ACL Middleware

index.ts

import express from 'express';
import { authorize, config } from 'extended-router-acl';

const app = express();

config({
  file: 'acl.yml',
});

app.use(authorize);

app.use('/', (req, res) => res.send({ ... }));
app.use('/books', (req, res) => res.send({ ... }));

app.listen(3000);

acl.yml

- resource: /
  permissions:
    public:
      - GET
- resource: /books
  permissions:
    admin:
      - GET
      - POST
      - DELETE

Install

npm install extended-router-acl

Features

  • Resource based ACL
  • Public route handling
  • Hooking functions

Docs

soon

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i extended-router-acl

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

22.9 kB

Total Files

15

Last publish

Collaborators

  • mattzk