Bug 21082

Summary: OverDrive authentication method no longer supported
Product: Koha Reporter: Nick Clemens <nick>
Component: Architecture, internals, and plumbingAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: caroline.cyr-la-rose, fridolin.somers, jzairo, kyle, martin.renvoize, nate
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34979
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 21542, 22030    
Attachments: Bug 21082: Database updates
Bug 21082: Add new admin page for overdrive
Bug 21082: DO NOT PUSH - Schema changes
Bug 21082: Update OverDrive authentication method
Bug 21082: Database updates
Bug 21082: Add new admin page for overdrive
Bug 21082: Update OverDrive authentication method
Bug 21082: DO NOT PUSH - Schema updates
Bug 21082: DO NOT PUSH - Schema updates
Bug 21082: Database updates
Bug 21082: Add new admin page for overdrive
Bug 21082: Update OverDrive authentication method
Bug 21082: DO NOT PUSH - Schema updates
Bug 21082: Database updates
Bug 21082: Add new admin page for overdrive
Bug 21082: Update OverDrive authentication method

Description Nick Clemens 2018-07-17 13:48:10 UTC
When OverDrive circulation/integration was introduced it used the 'Granted authentication' API

This API is no longer supported on OverDrive's new library sites, we need to switch to the 'Patron authentication' API
Comment 1 Nick Clemens 2018-07-17 14:56:53 UTC Comment hidden (obsolete)
Comment 2 Nick Clemens 2018-07-17 14:56:56 UTC Comment hidden (obsolete)
Comment 3 Nick Clemens 2018-07-17 14:56:59 UTC Comment hidden (obsolete)
Comment 4 Nick Clemens 2018-07-17 14:57:01 UTC Comment hidden (obsolete)
Comment 5 Mark Tompsett 2018-09-18 17:25:43 UTC
Comment on attachment 77053 [details] [review]
Bug 21082: Database updates

Review of attachment 77053 [details] [review]:
-----------------------------------------------------------------

::: installer/data/mysql/sysprefs.sql
@@ +415,4 @@
>  ('OverDriveClientKey','','Client key for OverDrive integration','30','Free'),
>  ('OverDriveClientSecret','','Client key for OverDrive integration','30','YesNo'),
>  ('OverDriveLibraryID','','Library ID for OverDrive integration','','Integer'),
> +('OverDrivePasswordRequired','',NULL,'Does the library require passwords for OverDrive SIP authentication','Free'),

Shouldn't 'Free' be 'YesNo'?
Comment 6 Mark Tompsett 2018-09-18 17:31:22 UTC
Comment on attachment 77056 [details] [review]
Bug 21082: Update OverDrive authentication method

Review of attachment 77056 [details] [review]:
-----------------------------------------------------------------

::: opac/svc/overdrive
@@ +45,4 @@
>  eval {
>          {
>              $action eq 'login' && do {
> +                my $password = $cgi->param("password") // "" ;

Not a real issue, but q{} is perlcritic friendlier. Even '' would be better than "".
Comment 7 Nick Clemens 2018-10-02 00:30:24 UTC
Created attachment 79792 [details] [review]
Bug 21082: Database updates

https://bugs.koha-community.org/show_bug.cgi?id=2108


Current status: Needs Signoff
Comment 8 Nick Clemens 2018-10-02 00:30:28 UTC
Created attachment 79793 [details] [review]
Bug 21082: Add new admin page for overdrive

The 'authname' field required for OverDrive can differ per branch.
This patch adds Koha Objects for dealing with OD info and submitting
authnames per branch. The description is left open so future branch info
can be added.

To test:
1 - prove -v t/db_dependent/Koha/Library/OverDriveInfos.t
2 - visit cgi-bin/koha/admin/overdrive.pl
3 - Add some authnames for various branches
4 - Verify data saves correctly

https://bugs.koha-community.org/show_bug.cgi?id=2108
Comment 9 Nick Clemens 2018-10-02 00:30:32 UTC
Created attachment 79794 [details] [review]
Bug 21082: Update OverDrive authentication method

Testing will require an OverDrive account, you should be able to obtain a
developer account here:
https://developer.overdrive.com/

You will need to register a SIP connection for patron authentication

To test authentication:
 1 - Set authname default in OD prefs
 2 - Sign in as a patron whose branch matches authname
 3 - Verify the patron can sign into OverDrive
 4 - Set the patrons branch authname to be incorrect
 5 - Verify branch specific authname is used and patron cannot sign in
 6 - Set the default authname to be incorrect and patron's branch
 authname to be correct
 7 - Verofy patron can sign in

To test circulation:
 1 - Fill out all OD prefs and enable circulation
 2 - Sign in to opac
 3 - Verify you have an OverDrive tab
 4 - Click 'Login to Overdrive'
 5 - If password required you shoudl be prompted, otherwise you should be
signed in and see account info
 6 - Test logging out and in
 7 - Log-in, perform a search on the opac - you should see hold/checkout
buttons
 8 - Test the buttons
 9 - After holding/checking out items, check your account page
10 - Verify info is correct
11 - Log out of overdrive
12 - Search catalog click overdrive results
13 - Test "Login to Overdrive" link on OD results
14 - Verify page is reloaded, buttons show and work

https://bugs.koha-community.org/show_bug.cgi?id=2108
Comment 10 Nick Clemens 2018-10-02 00:30:37 UTC Comment hidden (obsolete)
Comment 11 Nick Clemens 2018-10-03 14:38:10 UTC
Created attachment 79894 [details] [review]
Bug 21082: DO NOT PUSH - Schema updates

https://bugs.koha-community.org/show_bug.cgi?id=2108
Comment 12 ByWater Sandboxes 2018-10-04 17:32:42 UTC
Created attachment 79954 [details] [review]
Bug 21082: Database updates

https://bugs.koha-community.org/show_bug.cgi?id=2108

Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>

Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>
Comment 13 ByWater Sandboxes 2018-10-04 17:32:46 UTC
Created attachment 79955 [details] [review]
Bug 21082: Add new admin page for overdrive

The 'authname' field required for OverDrive can differ per branch.
This patch adds Koha Objects for dealing with OD info and submitting
authnames per branch. The description is left open so future branch info
can be added.

To test:
1 - prove -v t/db_dependent/Koha/Library/OverDriveInfos.t
2 - visit cgi-bin/koha/admin/overdrive.pl
3 - Add some authnames for various branches
4 - Verify data saves correctly

https://bugs.koha-community.org/show_bug.cgi?id=2108

Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>

Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>
Comment 14 ByWater Sandboxes 2018-10-04 17:32:49 UTC
Created attachment 79956 [details] [review]
Bug 21082: Update OverDrive authentication method

Testing will require an OverDrive account, you should be able to obtain a
developer account here:
https://developer.overdrive.com/

You will need to register a SIP connection for patron authentication

To test authentication:
 1 - Set authname default in OD prefs
 2 - Sign in as a patron whose branch matches authname
 3 - Verify the patron can sign into OverDrive
 4 - Set the patrons branch authname to be incorrect
 5 - Verify branch specific authname is used and patron cannot sign in
 6 - Set the default authname to be incorrect and patron's branch
 authname to be correct
 7 - Verofy patron can sign in

To test circulation:
 1 - Fill out all OD prefs and enable circulation
 2 - Sign in to opac
 3 - Verify you have an OverDrive tab
 4 - Click 'Login to Overdrive'
 5 - If password required you shoudl be prompted, otherwise you should be
signed in and see account info
 6 - Test logging out and in
 7 - Log-in, perform a search on the opac - you should see hold/checkout
buttons
 8 - Test the buttons
 9 - After holding/checking out items, check your account page
10 - Verify info is correct
11 - Log out of overdrive
12 - Search catalog click overdrive results
13 - Test "Login to Overdrive" link on OD results
14 - Verify page is reloaded, buttons show and work

https://bugs.koha-community.org/show_bug.cgi?id=2108

Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>

Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>
Comment 15 ByWater Sandboxes 2018-10-04 17:32:52 UTC
Created attachment 79957 [details] [review]
Bug 21082: DO NOT PUSH - Schema updates

https://bugs.koha-community.org/show_bug.cgi?id=2108

Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>

Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>
Comment 16 Chris Cormack 2018-10-05 00:00:30 UTC
Created attachment 79985 [details] [review]
Bug 21082: Database updates

Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 17 Chris Cormack 2018-10-05 00:00:53 UTC
Created attachment 79986 [details] [review]
Bug 21082: Add new admin page for overdrive

The 'authname' field required for OverDrive can differ per branch.
This patch adds Koha Objects for dealing with OD info and submitting
authnames per branch. The description is left open so future branch info
can be added.

To test:
1 - prove -v t/db_dependent/Koha/Library/OverDriveInfos.t
2 - visit cgi-bin/koha/admin/overdrive.pl
3 - Add some authnames for various branches
4 - Verify data saves correctly

Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 18 Chris Cormack 2018-10-05 00:01:18 UTC
Created attachment 79987 [details] [review]
Bug 21082: Update OverDrive authentication method

Testing will require an OverDrive account, you should be able to obtain a
developer account here:
https://developer.overdrive.com/

You will need to register a SIP connection for patron authentication

To test authentication:
 1 - Set authname default in OD prefs
 2 - Sign in as a patron whose branch matches authname
 3 - Verify the patron can sign into OverDrive
 4 - Set the patrons branch authname to be incorrect
 5 - Verify branch specific authname is used and patron cannot sign in
 6 - Set the default authname to be incorrect and patron's branch
 authname to be correct
 7 - Verofy patron can sign in

To test circulation:
 1 - Fill out all OD prefs and enable circulation
 2 - Sign in to opac
 3 - Verify you have an OverDrive tab
 4 - Click 'Login to Overdrive'
 5 - If password required you shoudl be prompted, otherwise you should be
signed in and see account info
 6 - Test logging out and in
 7 - Log-in, perform a search on the opac - you should see hold/checkout
buttons
 8 - Test the buttons
 9 - After holding/checking out items, check your account page
10 - Verify info is correct
11 - Log out of overdrive
12 - Search catalog click overdrive results
13 - Test "Login to Overdrive" link on OD results
14 - Verify page is reloaded, buttons show and work

Signed-off-by: Sandy Allgood <sandy.allgood@citruslibraries.org>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 19 Nick Clemens 2018-10-09 16:24:44 UTC
Awesome work all!

Pushed to master for 18.11
Comment 20 Martin Renvoize 2018-10-26 11:23:09 UTC
Pushed to 18.05.x for 18.05.06
Comment 21 Fridolin Somers 2018-11-28 08:14:01 UTC
I pass for 17.11.x