]> 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)
committerWainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Wed, 24 Jan 2024 08:30:00 +0000 (08:30 +0000)
commite424b07d2733a23ce15ae56f2686917601ebcd59
treeabc7f46192a66a15d6ea326e43c8e9cb6f118da7
parentcd809940b71b8555fa6d40fe38ff662e5384233e
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>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Koha/REST/V1/Auth/Password.pm [new file with mode: 0644]