Koha-clms/Koha/Auth
Tomás Cohen Arazi 13e8f6105a
Bug 33782: (follow-up) Remove code duplication in OAuth client
This patch eliminates duplicated patron search logic in the
_get_data_and_patron method by extracting it into a dedicated
helper method _find_patron_by_matchpoint.

Changes:
- Extract duplicated patron search logic (8 lines removed)
- Add _find_patron_by_matchpoint helper method
- Improve code maintainability and readability
- No functional changes - behavior preserved

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Auth/Client/OAuth.t
=> SUCCESS: Tests pass! OAuth client tests work correctly
  k$ prove t/db_dependent/api/v1/oauth.t
=> SUCCESS: Tests pass! OAuth API integration works
3. Confirm OAuth authentication still works in browser
4. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:32 -07:00
..
Client Bug 33782: (follow-up) Remove code duplication in OAuth client 2026-02-10 10:51:32 -07:00
Identity Bug 32370: Adapt Koha::Auth::Identity::Provider 2026-01-22 10:02:26 -07:00
Client.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Permissions.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
TwoFactorAuth.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00