http://qs321.pair.com?node_id=530669


in reply to comparing md5 hashed passwords

You have your CREDENTIALS setup so that you require 3 pieces of information to authenticate (authen_username, authen_domain, authen_password). But then in the DBI Driver, you are using __CREDENTIAL_2__ as the password, even though it is number 3 in your list. If you remove the 'authen_domain' entry, it should start to work.

Also, since DBIx::UserDB has it's own method for testing authentication, it might be easier to use that method through a callback, instead of the DBI driver. That way if DBIx::UserDB ever changes the DB structure, your code will still work.

use Digest::MD5 qw(md5_hex); DistroPrsRls->authen->config( DRIVER => [ 'Generic', sub { my $username = shift; # credential 1 my $password = shift; # credential 2 if ($userdb->user_login($username, md5_hex($password)) { return $username; } return; } ], STORE => 'Session', POST_LOGIN_RUNMODE => 'login_welcome', POST_LOGIN_CALLBACK => \&update_login_date, CREDENTIALS => [ 'authen_username', 'authen_password' ], LOGIN_SESSION_TIMEOUT => { IDLE_FOR => '5m', EVERY => '1h' }, );