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

--- Comment #74 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 209540
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209540&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

Signed-off-by: David Nind <[email protected]>
Signed-off-by: Martin Renvoize <[email protected]>
Signed-off-by: Brendan Lawlor <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to