jaredhanson / passport-http

HTTP Basic and Digest authentication strategies for Passport and Node.js.
https://www.passportjs.org/packages/passport-http/?utm_source=github&utm_medium=referral&utm_campaign=passport-http&utm_content=about
MIT License
268 stars 110 forks source link

Add auth info in basic callback #14

Open rgjamkhedkar opened 11 years ago

rgjamkhedkar commented 11 years ago

At the moment you are not taking info in basic auth callback. So extra information about authenticated client cannot be passed to req.authInfo object. I changed code as follows. this._verify(userid, password, function(err, user, info) { if (err) { return self.error(err); } if (!user) { return self.fail(self._challenge()); } self.success(user, info); });

I am sure others would also benefit if you change code as above.

mcgrews3 commented 10 years ago

Also noticed the same issue. Just need to include info as an argument to verified (basic.js line 88) and the self.success call (basic.js line 91)

JasonCust commented 9 years ago

+1

datuary-jmartinez commented 9 years ago

+1. I think it's a very interesting change because allow send customized data back to client. It is also very simple one. Thank you

markwainwright commented 9 years ago

+1

mcgrews3 commented 9 years ago

Pull request created...

https://github.com/jaredhanson/passport-http/pull/48

tgyhlsb commented 8 years ago

+1