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)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 2 Feb 2024 16:31:47 +0000 (17:31 +0100)
commit11e919cc1974d278fb28a2fb6b7a38ca3fe178e2
tree17f0f5ae4b55ea1859ce6baed4316fafed48e327
parentc1b94fc0110db53718053a0ff23d52000f304d47
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: Katrin Fischer <katrin.fischer@bsz-bw.de>
Koha/REST/V1/Auth/Password.pm