]> git.koha-community.org Git - koha.git/commit
Bug 34893: Add checkpw change to REST API
authorDavid Cook <dcook@prosentient.com.au>
Tue, 28 Nov 2023 22:57:39 +0000 (22:57 +0000)
committerFrédéric Demians <f.demians@tamil.fr>
Fri, 26 Jan 2024 08:56:38 +0000 (09:56 +0100)
commitf95d43984c64b3b1c69a730a81b3b031b75323eb
treee864f2e3c3986f6392c23d81bf0f5de240f6d69e
parentb732e60e0c90072881d115658d25d1256293456d
Bug 34893: Add checkpw change to REST API

This patch adds the checkpw return value change to the REST API
route for validating user identifiers and password.

Test plan:
0. Apply patch
1. prove t/db_dependent/api/v1/password_validation.t

Bonus points:
1. koha-plack --reload kohadev
2. Enable syspref RESTBasicAuth
3. curl -XPOST -H "Content-Type: application/json" \
-u <staff_userid>:<staff_password> \
-d '{"identifier":"<cardnumber>","password":"<password>"}' \
http://localhost:8081/api/v1/auth/password/validation
4. Validation doesn't fail. It gives you cardnumber, patron_id, userid

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fc1ea85ed024a9789827a1c17376bfc18f19cef0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 1cb97e995b8386c6f0684c11713ff1ecad12db62)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Koha/REST/V1/Auth/Password.pm