Permalink
Browse files

use authorization header iff it starts with Bearer

  • Loading branch information...
1 parent 189e344 commit 8238548cdfc148a19980720d89c381d952e41786 @RandomEtc RandomEtc committed Jan 26, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 index.js
View
@@ -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'] && req.headers['authorization'].indexOf('Bearer') == 0) {
atok = req.headers['authorization'].replace('Bearer', '').trim();
} else {
return next();

0 comments on commit 8238548

Please sign in to comment.