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' }, );