Koha-clms/Koha/REST
Tomas Cohen Arazi 448ac1a22f Bug 36420: Allow Basic authentication using `cardnumber`
This patch makes the API Basic authentication work with cardnumbers.
The used `checkpw_internal` method already does the fallback check.

To test:
1. Apply the unit tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/auth_basic.t
=> FAIL: Tests explode! [1]
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

[1] This highlights an underlying bug! Instead of getting 403, etc we get a 500. This is because of the internal fallback mechanism allowing the cardnumber+password combination, but then the Koha::Patron->find... not finding :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 154a2ea9ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit dd58ce2a03)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-05-28 19:33:20 +00:00
..
Plugin Bug 36421: Make sure pre-controller errors are correctly logged 2024-05-28 16:24:10 +00:00
V1 Bug 36420: Allow Basic authentication using `cardnumber` 2024-05-28 19:33:20 +00:00
V1.pm Bug 34271: Remove a few Logger statements from REST API 2023-10-24 21:31:04 -10:00