RBAC (Role-based access control) plugin for Fastify.
This plugin uses fast-rbac under the hood.
- v1.x.x - supports
npm i fastify-rbac --save
Features and requirements
- Wildcard rules support
- Inheritance support
- Typescript support
- Requires fastify
Add it to your project like regular fastify plugin. Use
register method and pass options to it.
const fastify = ;const app = ;const rbacPlugin = ;app;
rbac to fastify instance
fastify.rbac which you may use to check/add/remove roles and permissions.
See RBAC Options.
See plugin docs.
Also refer to RBAC docs.
Licensed under MIT.