Koha-clms/t/Koha
David Cook dbadb00d7b
Bug 34164: Redirect to referring URL when doing OIDC/OAuth SSO
This patch makes it so that a successful SSO will return you to
the place where you initiated the SSO. This is especially useful
when doing searches, placing holds, etc.

Test plan:
0. Apply patch and koha-plack --restart kohadev
1. Set up OIDC SSO using
https://wiki.koha-community.org/wiki/Testing_SSO
2. Go to http://localhost:8081/cgi-bin/koha/circ/circulation-home.pl
3. Do a staff login using SSO
4. Note that you're redirected to
http://localhost:8081/cgi-bin/koha/circ/circulation-home.pl
after the successful login

5. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
6. Do a OPAC SSO login
7. Note that you're returned to
http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
after the successful login

8. Logout of the staff admin and OPAC
9. Note your URL ends in ?logout.x=1
10. Try logging back into them using SSO
11a. Note that you're logged in and not automatically logged out
11b. Note that if you're on the OPAC, you should be redirected
to opac-user.pl instead of opac-main.pl or the root path

12. If you change the domain for the SSO users to something
that your user does not match, try logging in again, and note
that the error message should display on mainpage.pl or opac-main.pl/opac-user.pl
for the OPAC. (This is because these are the pages that show SSO errors.)

Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
2026-01-05 17:47:25 +00:00
..
Auth Bug 34164: Redirect to referring URL when doing OIDC/OAuth SSO 2026-01-05 17:47:25 +00:00
Authority Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Database Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
DateTime/Format Bug 38944: Manual changes 2025-03-13 17:25:04 +01:00
I18N/po/xx_XX/LC_MESSAGES Bug 29695: Add new module Koha::Database::Columns 2022-04-12 11:40:16 +02:00
Installer Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Middleware Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Object Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Plugins Bug 40444: Add a test to ensure all Perl test files use Test::NoWarnings 2025-09-16 14:02:25 +02:00
REST/Plugin Bug 40423: Unit tests 2025-08-22 09:47:53 +02:00
Result Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
SearchEngine Bug 36947: (QA follow-up) Add skippable unit test for fi_FI locale 2025-07-24 10:23:44 +02:00
Util Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Config.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Email.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Exceptions.t Bug 39632: Extend plugin exceptions with more useful parameters 2025-08-22 09:48:13 +02:00
I18N.t Bug 36947: Add system preference for configurable locale-based facet sorting 2025-07-24 10:23:42 +02:00
ItemType.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Manual.t Bug 40845: Remove hardcoded Koha version from t/Koha/Manual.t 2025-11-25 17:36:07 +01:00
Script.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Script_cron.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
Z3950responder.t Bug 38944: Add Test::NoWarnings to tests no producing warnings 2025-03-13 17:25:03 +01:00
sleep.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
wait.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00