Skip to content

Commit 76ec860

Browse files
committed
Request object is passed to the child verifier functions
1 parent 90000de commit 76ec860

File tree

1 file changed

+3
-1
lines changed
  • lib/passport-http-oauth/strategies

1 file changed

+3
-1
lines changed

lib/passport-http-oauth/strategies/token.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ function TokenStrategy(options, consumer, verify, validate) {
117117
this._host = options.host || null;
118118
this._realm = options.realm || 'Users';
119119
this._ignoreVersion = options.ignoreVersion || false;
120+
this.req = null;
120121
}
121122

122123
/**
@@ -134,7 +135,8 @@ util.inherits(TokenStrategy, passport.Strategy);
134135
TokenStrategy.prototype.authenticate = function(req) {
135136
var params = undefined
136137
, header = null;
137-
138+
139+
this.req = req;
138140
if (req.headers && req.headers['authorization']) {
139141
var parts = req.headers['authorization'].split(' ');
140142
if (parts.length >= 2) {

0 commit comments

Comments
 (0)