Digest Authentication of users from MySQL database

73 views
Skip to first unread message

docmattman

unread,
Mar 23, 2009, 11:17:45 PM3/23/09
to SabreDAV Discussion
Has anyone been able to authenticate users with the Digest method from
a MySQL table?

I have a "users" table where I store the username and an md5 hash
value for their password. The problem is that I can't do the
recommended:

$hash = md5($u . ':' . $realm . ':' . $p);

My user's passwords are already in their md5 hash form, so this
wouldn't work. If I need to, I can store an additional value in the
users table to authenticate here. I just need a little direction for
this. Has anyone linked the Digest to a MySQL database? If so, how?

Evert Pot

unread,
Mar 23, 2009, 11:24:04 PM3/23/09
to sabredav...@googlegroups.com

You are in fact pretty much stuck to storing that hash (or the plain
password).

The best recommendation I can make is to add the extra field, and
populate the secondary field whenever they login through the 'regular'
frontend. This is pretty much the only time you'll actually know what
the password originally was.

Evert

docmattman

unread,
Mar 23, 2009, 11:41:24 PM3/23/09
to SabreDAV Discussion
Yeah, I was wondering what the best way would be to store that hash.
Storing it at login is a pretty good idea. Thanks for the advice!
Reply all
Reply to author
Forward
0 new messages