Work around the above limitation by using OpenSRF::AppSession
to create a session for open-ils.auth in the authenticate method.
Also requires us to manually check if we're bootstrapped, since
we can't rely on OpenILS::Utils::Cronscript->session to do it for
us.
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
my $self = shift or return;
my $args = shift or return;
if ($args && ref($args) eq 'HASH') {
- my $session = $self->session('open-ils.auth');
+ $self->{bootstrapped} or $self->bootstrap();
+ my $session = Opensrf::AppSession->create('open-ils.auth');
my $seed = $session->request('open-ils.auth.authenticate.init',
$args->{'username'})->gather(1);
$args->{password} = md5_hex($seed . md5_hex($args->{password}));