connect-roles
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -38,3 +38,3 @@ "use strict"; | ||
else if(req.user){ failureHandler(req, res, "isAuthenticated"); } | ||
else { throw "Request.user was null or undefined, include middleware"; } | ||
else { throw new Error("Request.user was null or undefined, include middleware"); } | ||
}; | ||
@@ -41,0 +41,0 @@ |
{ | ||
"name": "connect-roles", | ||
"description": "Provides dynamic roles based authentication for node.js connect and express servers.", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"homepage": "http://documentup.com/ForbesLindesay/connect-roles", | ||
"repository": { | ||
"type":"git", | ||
"type": "git", | ||
"url": "git://github.com/ForbesLindesay/connect-roles.git" | ||
@@ -9,0 +9,0 @@ }, |
[![Build Status](https://secure.travis-ci.org/ForbesLindesay/connect-roles.png?branch=master)](http://travis-ci.org/ForbesLindesay/connect-roles) | ||
# Connect Roles | ||
Connect roles is designed to work with connect or express. It is an authorization provider, not an authentication provider. It is designed to support context sensitive roles/abilities, through the use of middleware style authentication strategies. | ||
Connect roles is designed to work with connect or express. It is an authorization provider, not an authentication provider. It is designed to support context sensitive roles/abilities, through the use of middleware style authorization strategies. If you're looking for an authentication system I suggest you check out [passport.js](https://github.com/jaredhanson/passport) | ||
@@ -90,4 +90,4 @@ All code samples assume you have already used: | ||
if(user.isAuthenticated){//You can remove this if already checking for anonymous users | ||
if(req.params.userid){ | ||
if(user.id === req.params.userid){ | ||
if(this.params.userid){//`this` refers to the current request object | ||
if(user.id === this.params.userid){ | ||
return true; | ||
@@ -155,4 +155,4 @@ } | ||
if(user.isAuthenticated){//You can remove this if already checking for anonymous users | ||
if(req.params.userid){ | ||
if(user.id === req.params.userid){ | ||
if(this.params.userid){ | ||
if(user.id === this.params.userid){ | ||
return true; | ||
@@ -159,0 +159,0 @@ } |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
19318
0
1