LP#1807398 marc_stream/oils_header auth repairs
authorBill Erickson <berickxx@gmail.com>
Fri, 7 Dec 2018 19:19:32 +0000 (14:19 -0500)
committerBill Erickson <berickxx@gmail.com>
Mon, 10 Dec 2018 20:29:59 +0000 (15:29 -0500)
Fixed a few code thinkos in marc stream workstation login support.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jason Boyer <JBoyer@library.in.gov>
Open-ILS/src/support-scripts/marc_stream_importer.pl
Open-ILS/src/support-scripts/oils_header.pl

index 19e3f49..ac46584 100755 (executable)
@@ -95,7 +95,7 @@ GetOptions(
     'verbose'               => \$verbose,
     'username=s'            => \$username,
     'password=s'            => \$password,
-    'workstation'           => \$workstation,
+    'workstation=s'         => \$workstation,
     'tempdir=s'             => \$tempdir,
     'spoolfile=s'           => \$spoolfile,
     'wait=i'                => \$wait_time,
index de9a84f..55da43c 100755 (executable)
@@ -151,7 +151,7 @@ sub oils_event_die {
 # Login to the auth server and set the global $authtoken var
 #----------------------------------------------------------------
 sub oils_login {
-       my( $username, $password, $type ) = @_;
+       my( $username, $password, $type, $workstation ) = @_;
 
        $type |= "staff";
 
@@ -160,9 +160,12 @@ sub oils_login {
                'open-ils.auth.authenticate.init', $username, $nonce);
        err("No auth seed") unless $seed;
 
-       my $opts = {    username => $username,
-                       password => md5_hex($seed . md5_hex($password)),
-                       type => $type };
+    my $opts = {
+        username => $username,
+        password => md5_hex($seed . md5_hex($password)),
+        type => $type,
+        nonce => $nonce
+    };
 
        if(defined($workstation)) {
                $opts->{workstation} = $workstation;