incorporate Dancer::Plugin::Passphrase to avoid broken installs

This commit is contained in:
Oliver Gorwits
2014-02-09 11:38:23 +00:00
parent aaf886740c
commit 6799443d6d
5 changed files with 758 additions and 6 deletions

View File

@@ -10,7 +10,7 @@ use base 'Dancer::Plugin::Auth::Extensible::Provider::Base';
use Dancer ':syntax';
use Dancer::Plugin::DBIC;
use Dancer::Plugin::Passphrase;
use App::Netdisco::Web::Plugin::Passphrase;
use Digest::MD5;
sub authenticate_user {
@@ -78,7 +78,6 @@ sub match_with_local_pass {
return unless $password and $user->$password_column;
if ($user->$password_column !~ m/^{[A-Z]+}/) {
debug 'authN: using legacy MD5';
my $sum = Digest::MD5::md5_hex($password);
if ($sum eq $user->$password_column) {
@@ -93,7 +92,6 @@ sub match_with_local_pass {
}
}
else {
debug 'authN: using Passphrase';
return passphrase($password)->matches($user->$password_column);
}
}