Socket
Socket
Sign inDemoInstall

passport

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

6

lib/passport/context/http/actions.js

@@ -25,3 +25,4 @@ /**

/**
* Fail authentication, with optional `challenge`.
* Fail authentication, with optional `challenge` and `status`, defaulting to
* 401.
*

@@ -31,5 +32,6 @@ * Strategies should call this function to fail an authentication attempt.

* @param {String} challenge
* @param {Number} status
* @api public
*/
actions.fail = function(challenge) {
actions.fail = function(challenge, status) {
this.delegate.fail.apply(this, arguments);

@@ -36,0 +38,0 @@ }

@@ -246,3 +246,3 @@ /**

*/
exports.version = '0.1.2';
exports.version = '0.1.3';

@@ -249,0 +249,0 @@ /**

@@ -80,3 +80,3 @@ /**

}
delegate.fail = function(challenge) {
delegate.fail = function(challenge, status) {
if (callback) {

@@ -88,2 +88,8 @@ return callback(null, false);

if (typeof challenge == 'number') {
status = challenge;
challenge = null;
}
// When failure handling is not delegated to the application, the default

@@ -93,3 +99,3 @@ // is to respond with 401 Unauthorized. Note that the WWW-Authenticate

// actions#fail).
res.statusCode = 401;
res.statusCode = status || 401;
if (challenge) {

@@ -111,3 +117,3 @@ this.res.setHeader('WWW-Authenticate', challenge);

strategy.authenticate(req);
strategy.authenticate(req, options);
}

@@ -114,0 +120,0 @@ }

@@ -22,5 +22,6 @@ /**

* @param {Object} req
* @param {Object} options
* @api protected
*/
Strategy.prototype.authenticate = function(req) {
Strategy.prototype.authenticate = function(req, options) {
throw new Error('Strategy#authenticate must be overridden by subclass');

@@ -27,0 +28,0 @@ }

{
"name": "passport",
"version": "0.1.2",
"version": "0.1.3",
"description": "Authentication framework for Connect and Express.",

@@ -5,0 +5,0 @@ "author": "Jared Hanson <jaredhanson@gmail.com> (http://www.jaredhanson.net/)",

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