]> 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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 29 Jan 2024 09:15:53 +0000 (10:15 +0100)
commit99e70be47f6ada27055f3972f46af1ce1fca41f6
treec514da108aeb983ec74b4cf414eb94a443c08f7d
parent94aa54d6e439d45c28d1208b5e435a6a997ed6f0
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>
Koha/REST/V1/Auth/Password.pm