Skip to content

Commit

Permalink
Pass session token AND auth token
Browse files Browse the repository at this point in the history
It turns out that once you have a session token from the EDS API, you
need to pass that AND the previously obtained auth token, otherwise
requests fail with "invalid session token", which is misleading because
the session token is valid, it's the missing auth token that's the
problem.
  • Loading branch information
Andrew Isherwood committed Feb 5, 2020
1 parent 74c020e commit 563092c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Koha/Plugin/Com/PTFSEurope/AvailabilityEds.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use Digest::MD5 qw( md5_hex );
use MIME::Base64 qw( decode_base64 );
use URI::Escape qw ( uri_unescape );

our $VERSION = "1.0.2";
our $VERSION = "1.0.3";

our $metadata = {
name => 'ILL availability - EDS',
Expand Down
3 changes: 2 additions & 1 deletion Koha/Plugin/Com/PTFSEurope/AvailabilityEds/Api.pm
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ __BODY__

my @search_headers = (
'Accept' => 'application/json',
'x-sessionToken' => $session_token
'x-sessionToken' => $session_token,
'x-authenticationToken' => $auth_token
);

# Calculate which page of result we're requesting
Expand Down

0 comments on commit 563092c

Please sign in to comment.