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

connect-oauth

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-oauth - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

20

lib/oauth/index.js

@@ -98,3 +98,9 @@ var sys = require('sys'),

this.use('/', function(err, req, res, next) {
self.handleError(err, req, res, next);
if(err.statusCode !== 401) return next(err);
res.writeHead(401, {
'Content-Type': 'text/plain',
'WWW-Authenticate': 'OAuth realm="'+self.realm+'"'
});
res.end(err.message || err);
});

@@ -177,14 +183,2 @@ }

OAuth.prototype.handleError = function(err, req, res, next) {
var headers = {
'Content-Type': 'text/plain',
};
if(err.statusCode == 401)
headers['WWW-Authenticate'] = 'OAuth realm="'+this.realm+'"';
res.writeHead(err.statusCode || 500, headers);
res.end(err.message || err);
}
module.exports.createProvider = function(options) {

@@ -191,0 +185,0 @@ return new OAuth(options);

@@ -5,3 +5,3 @@ {

"description": "Connect framework middleware implementing an OAuth 1.0a provider",
"version": "0.4.2",
"version": "0.4.3",
"repository": {

@@ -8,0 +8,0 @@ "url": ""

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