https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24401 --- Comment #44 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 197527 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197527&action=edit Bug 24401: Add as_token/check_token to Koha::Availability::Result Introduces a subclass pattern for typed availability results with built-in JWT token generation and validation. Koha::Availability::Result gains: - as_token($params) — generate a JWT confirmation token - check_token($params) — validate a JWT confirmation token - token_params (abstract) — subclasses define required params - _token_id — deterministic payload from sorted param keys Koha::Item::Checkin::Availability::Result is the first subclass, defining token_params as [qw(item_id user_id)]. The Checkins controller no longer imports Koha::Token or knows about token internals — it just calls: $availability->as_token({ user_id => ..., item_id => ... }) $availability->check_token({ ..., token => $token }) -- You are receiving this mail because: You are watching all bug changes.