From 156a673ae7f64fe485448254c35943cf70164199 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 29 Oct 2021 16:17:17 -0300 Subject: [PATCH] Bug 28417: (follow-up) Fix typo - There are CAS demo servers, pick one [1] - They all seem to have the same user/pass as of writing this: User: casuser Password: Mellon To test: 1. Enable CAS and all related preferences. I chose v3 or higher, it only affects the logout action. 2. Set the CAS URL: https://casserver.herokuapp.com/cas (note that if you click on any of the examples, they include a trailing /login, don't put it). 3. Generate a Koha user, with userid: casuser (I also used that for cardnumber, just in case). Set no password to the user, or its irrelevant anyway. Add it stff permissions. 4. Open your Koha OPAC, I use KTD thus: http://kohadev.myDNSname.org:8080 5. Try to login using CAS => SUCCESS: You are redirected to the right login page 6. Login using casuser/Mellon as advertised in the 'demos' site. => SUCCESS: You are logged in! 7. Now logout => SUCCESS: You are sent to CAS so they know you wanted to logout (if you enabled CAS logout) 8. Repeat on the staff interface. => SUCCESS: Things work! 9. Apply this patches, restart all the things: $ restart_all 10. Repeat all in OPAC and admin interfaces => SUCCESS: Things work! 11. Sign off :-D [1] https://apereo.github.io/cas/Demos.html Signed-off-by: Tomas Cohen Arazi --- C4/Auth_with_cas.pm | 2 +- opac/opac-user.pl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Auth_with_cas.pm b/C4/Auth_with_cas.pm index dd02afc9ae..5becd96fdc 100644 --- a/C4/Auth_with_cas.pm +++ b/C4/Auth_with_cas.pm @@ -33,7 +33,7 @@ our (@ISA, @EXPORT_OK); BEGIN { require Exporter; @ISA = qw(Exporter); - @EXPORT_OK = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required multilpleAuth getMultipleAuth); + @EXPORT_OK = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required multipleAuth getMultipleAuth); } my $defaultcasserver; my $casservers; diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 3b72d2fb98..6feb144e50 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -57,6 +57,7 @@ my $query = CGI->new; # CAS single logout handling # Will print header and exit +require C4::Auth_with_cas; C4::Context->preference('casAuthentication') and C4::Auth_with_cas::logout_if_required($query); my ( $template, $borrowernumber, $cookie ) = get_template_and_user( -- 2.33.1