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'
},
);
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.