X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/58fdd50dbb6b909d48b2846f36857b2bd2219441..d0c2cfbef2bfa708dad6df15c76daa81d4fda3ab:/SL/Auth.pm diff --git a/SL/Auth.pm b/SL/Auth.pm index 784b185b4..3ff6a1c3b 100644 --- a/SL/Auth.pm +++ b/SL/Auth.pm @@ -11,6 +11,7 @@ use YAML; use SL::Auth::Constants qw(:all); use SL::Auth::DB; use SL::Auth::LDAP; +use SL::Auth::Password; use SL::SessionFile; use SL::User; @@ -163,6 +164,15 @@ sub authenticate { return $result; } +sub store_credentials_in_session { + my ($self, %params) = @_; + + $params{password} = SL::Auth::Password->hash_if_unhashed(login => $params{login}, password => $params{password}) + unless $self->{authenticator}->requires_cleartext_password; + + $self->set_session_value(login => $params{login}, password => $params{password}); +} + sub dbconnect { $main::lxdebug->enter_sub(2);