Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Node.js/Express/Passport have an authorization module like CanCan for Rails?

Once a user is Authenticated, I would like a way to set the restrictions on what a user can view, edit and delete. Specifically, unless they are an Admin, they can view, edit and delete ONLY files that they own. I've seen some examples with EveryAuth and Ability.js, just wondering if there is an equivalent for those using Passport.js

like image 944
django-d Avatar asked Apr 15 '13 16:04

django-d


People also ask

What is Passport authentication in node JS?

Passport is a popular, modular authentication middleware for Node. js applications. With it, authentication can be easily integrated into any Node- and Express-based app. The Passport library provides more than 500 authentication mechanisms, including OAuth, JWT, and simple username and password based authentication.

What is authentication in Express JS?

Authentication is a process in which the credentials provided are compared to those on file in a database of authorized users' information on a local operating system or within an authentication server. If the credentials match, the process is completed and the user is granted authorization for access.


1 Answers

Might be it can help you in achieving what you want https://github.com/ForbesLindesay/connect-roles

like image 121
khurrum qureshi Avatar answered Sep 27 '22 15:09

khurrum qureshi