Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fastify-rbac

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-rbac

RBAC plugin for Fastify

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
78
decreased by-4.88%
Maintainers
1
Weekly downloads
 
Created
Source

fastify-rbac

NPM Version Downloads Count Vunerabilities Count Build Status License Codecov

RBAC (Role-based access control) plugin for Fastify.

This plugin uses fast-rbac under the hood.

ToC

Fastify support

  • v1.x.x - supports >= fastify-1.0.0

Installation

npm i fastify-rbac --save

Back to top

Features and requirements

  • Wildcard rules support
  • Inheritance support
  • Typescript support

  • Requires fastify >=1.0.0.
  • Node.js >=8.9.0.

Back to top

Usage

Add it to your project like regular fastify plugin. Use register method and pass options to it.

const fastify = require('fastify');
const app = fastify();

const rbacPlugin = require('fastify-rbac');
app.register(rbacPlugin, { /* rbac options */ });

It exposes rbac to fastify instance fastify.rbac which you may use to check/add/remove roles and permissions.

Back to top

Plugin options

See RBAC Options.

Docs

See plugin docs.

Also refer to RBAC docs.

Back to top

Changelog

See changelog.

Back to top

See also

Back to top

License

Licensed under MIT.

Back to top

Keywords

FAQs

Package last updated on 11 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc