'open-ils.auth_proxy',
'open-ils.auth_proxy.login', $args);
}
+
+ #If login fails, try what script thinks is a barcode as username
+ if($U->event_code($response)) {
+ $args->{username} = $args->{barcode};
+ if (!$auth_proxy_enabled) {
+ my $seed = $U->simplereq(
+ 'open-ils.auth',
+ 'open-ils.auth.authenticate.init', $username);
+ $args->{password} = md5_hex($seed . md5_hex($password));
+ $response = $U->simplereq(
+ 'open-ils.auth', 'open-ils.auth.authenticate.complete', $args);
+ } else {
+ $args->{password} = $password;
+ $response = $U->simplereq(
+ 'open-ils.auth_proxy',
+ 'open-ils.auth_proxy.login', $args);
+ }
+ }
+
$self->timelog("Checked password");
if($U->event_code($response)) {