Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull credentials from HTTP Basic Auth #15

Open
dustinsmith1024 opened this issue Jun 10, 2014 · 1 comment
Open

Pull credentials from HTTP Basic Auth #15

dustinsmith1024 opened this issue Jun 10, 2014 · 1 comment

Comments

@dustinsmith1024
Copy link

I just implemented passport-windowsauth and everything is going well. We are using HTTP Basic Auth to send the user/pass. So we pull the user/pass from the Authorization header first and push them onto the request.body.username and .password fields.

It's a bit awkward to populate the request.body manually. It'd be nice if we could remove this first piece of middleware and just have it all integrated here. Would you consider a PR for integrating Basic auth?

If not, we could make the user/pass assignment into a function that can be configured.
https://github.com/auth0/passport-windowsauth/blob/master/lib/strategy.js#L121

@jfromaniello
Copy link
Member

Yes, it should be an option like getUsernameFromHeader for integrated auth.. Maybe getCredentials and that takes the credentials from body by default..?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants