New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

connect-roles

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-roles - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

index.js

@@ -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 @@ }

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