Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fall-through to next middleware if Authorization isn't of type Bearer.

This should allow standard HTTP auth to function in a subsequent
middleware down the stack.

Closes #6
  • Loading branch information...
commit 8cb4ed0435ea277f1528860ec6ae88368f42608d 1 parent 724bef4
@ammmir authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  index.js
View
2  index.js
@@ -33,7 +33,7 @@ OAuth2Provider.prototype.login = function() {
if(req.query['access_token']) {
atok = req.query['access_token'];
- } else if(req.headers['authorization']) {
+ } else if((req.headers['authorization'] || '').indexOf('Bearer ') == 0) {
atok = req.headers['authorization'].replace('Bearer', '').trim();
} else {
return next();
Please sign in to comment.
Something went wrong with that request. Please try again.