]> 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)
committerLucas Gass <lucas@bywatersolutions.com>
Wed, 24 Jan 2024 17:33:44 +0000 (17:33 +0000)
commit2d8722c97de59bbe171d58c686b4d02a94af6229
treedef9a515d929e1fba293593cd12e1c47e6e22b80
parent38e1c2a951f766c46a370f0c1b27fd9eeadf27d7
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: Lucas Gass <lucas@bywatersolutions.com>
Koha/REST/V1/Auth/Password.pm