https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24539
--- Comment #16 from David Cook <[email protected]> --- To test (using a test auth plugin): 1. Download and install Koha Plugin koha-plugin-test-auth 2. Upload plugin via http://localhost:8081/cgi-bin/koha/plugins/plugins-home.pl 3. Enable the plugin 4. Go to http://localhost:8081/cgi-bin/koha/admin/patron-attr-types.pl 5. Create a new patron attribute with the code "TestAuthT" (you should make the description "TestAuthMagicLogin" but it doesn't matter, and you should make it a Unique identifier, so that a token can only belong to one patron) 6. Go to http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=51&step=4 7. Add "1234" to TestAuthMagicLogin attribute 8. Log out of Koha 9. koha-plack --restart kohadev #This loads the plugin route 10. Go to http://localhost:8081/api/v1/contrib/testauth/authn?token=1234 11. Note that you've been logged in as the "koha" user 12. Check /var/log/koha/kohadev/plack-api-error.log, and note warnings like the following: [2021/06/02 08:43:47] [WARN] Koha::Plugin::Dcook::TestAuth::AuthN::Plugin do_login at /var/lib/koha/kohadev/plugins/Koha/Plugin/Dcook/TestAuth/AuthN/Plugin.pm line 17. [2021/06/02 08:43:47] [WARN] Koha::Plugin::Dcook::TestAuth::AuthN::Plugin get_data at /var/lib/koha/kohadev/plugins/Koha/Plugin/Dcook/TestAuth/AuthN/Plugin.pm line 60. [2021/06/02 08:43:47] [WARN] $VAR1 = { 'TestAuthKey' => 'TestAuthValue' }; 13. Log out of the staff interface 14. Note that you've been logged out 15. Check /var/log/koha/kohadev/plack-intranet-error.log, and note warnings like the following: [2021/06/02 08:44:44] [WARN] Koha::Plugin::Dcook::TestAuth::AuthN::Plugin do_logout at /var/lib/koha/kohadev/plugins/Koha/Plugin/Dcook/TestAuth/AuthN/Plugin.pm line 52. [2021/06/02 08:44:44] [WARN] $VAR1 = { 'TestAuthKey' => 'TestAuthValue' }; 16. Go to http://localhost:8080/api/v1/contrib/testauth/authn?token=1234 17. Note that you've been logged into the OPAC 18. Log out of the OPAC 19. Note the warnings in /var/log/koha/kohadev/plack-api-error.log and /var/log/koha/kohadev/plack-opac-error.log -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
