@@ -207,7 +207,7 @@ ConsumerStrategy.prototype.authenticate = function(req) {
207207 // If no `oauth_token` is present, the consumer is attempting to abtain
208208 // a request token. Validate the request using only the consumer key
209209 // and secret, with the token secret being an empty string.
210- validate ( '' , function ( ) {
210+ validate ( '' , function ( user ) {
211211 // At this point, the request has been validated and the consumer is
212212 // successfully authenticated. The duty of this strategy is complete.
213213 //
@@ -235,7 +235,7 @@ ConsumerStrategy.prototype.authenticate = function(req) {
235235 // detect potential attacks, and display advisory notices to
236236 // users.
237237
238- return self . success ( consumer , info ) ;
238+ return self . success ( user , info ) ;
239239 } ) ;
240240 } else {
241241
@@ -320,11 +320,11 @@ ConsumerStrategy.prototype.authenticate = function(req) {
320320 // verified and authentication is successful.
321321 if ( self . _validate ) {
322322 // Give the application a chance it validate the timestamp and nonce, if
323- // it so desires.
323+ // it so desires. The valid param can be the user if a login session needs to be created.
324324 var next = function ( err , valid ) {
325325 if ( err ) { return self . error ( err ) ; }
326326 if ( ! valid ) { return self . fail ( self . _challenge ( 'nonce_used' ) ) ; }
327- return ok ( ) ;
327+ return ok ( valid ) ;
328328 } ;
329329
330330 if ( self . _passReqToCallback ) {
0 commit comments