Koha-clms/t/db_dependent/api
Tomás Cohen Arazi 417ac6fb03
Bug 42719: [26.05.x] Add regression tests
Add tests for the OAuth/OIDC login endpoint covering:
- IdP-initiated flow (no CGISESSID cookie on initial request)
- Callback without CGISESSID cookie (session lost)
- Normal SP-initiated flow (cookie present)

Tests create a real identity provider in the database and assert:
- Initial request without cookie redirects to the IdP authorize URL
- A CGISESSID cookie is set for the new session
- Callback without cookie returns wrong_csrf_token error (not 500)
- Normal flow with cookie redirects to IdP as expected

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4d7869ccb1155cda2be2f0b09933528de2dd9a85)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-09-25 09:42:14 -06:00
..
v1 Bug 42719: [26.05.x] Add regression tests 2026-09-25 09:42:14 -06:00