https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24401

--- Comment #52 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 198611
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198611&action=edit
Bug 24401: Add token support to Koha::Result::Availability

Adds as_token/check_token/to_api methods to Koha::Result::Availability
for the confirmation flow pattern used by circulation endpoints.

- as_token: generates a JWT from context objects + confirmation keys
- check_token: validates a JWT (returns false on invalid tokens)
- to_api: serializes blockers/confirms/warnings + token for API responses

Introduces Koha::Item::Availability::Checkin::Result subclass that
defines token_params as [item, user].

Updates Koha::Item::Availability::Checkin to use the Result subclass.

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
   k$ prove t/Koha/Result/Availability.t
=> SUCCESS: Tests pass!
3. Sign off :-D

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to