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

Custom Username Authentication #1817

Closed
prabhat2k15 opened this issue Jan 22, 2019 · 1 comment
Closed

Custom Username Authentication #1817

prabhat2k15 opened this issue Jan 22, 2019 · 1 comment

Comments

@prabhat2k15
Copy link

It would be great if provide a function for authenticating username like
pv_www_authenticate(realm, passwd, flags [, method])

Purpose: The purpose behind this is i want to modify username and then authenticate according to credentials saved in DB.

@miconda
Copy link
Member

miconda commented Jan 25, 2019

In my opinion this does not make sense.

The username value is taken from the username field of (Proxy-)Authorization header and that is the value the UAC used to build the Digest response. If you use a different value, practically the authentication fails. The Digest response has the username hashed inside, the HA1 being MD5(username:realm:password). To have a successful authentication, the same username must be used by server side as well.

If you just need to load the password by matching a different username, then sqlops can be used to do any kind of query. Anyhow pv_www_authenticate() doesn't do any database query.

In case you want to achieve something else, I would suggest to discuss first on sr-users mailing list to properly understand the needs. Again, this one with a custom username contradicts the authentication algorithm specs. I am closing this one for now, it can be reopened if there is a different conclusion after discussions on sr-users mailing list.

@miconda miconda closed this as completed Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants