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

--- Comment #2 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 201952
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201952&action=edit
Bug 43077: (follow-up) Refactor JWT methods to use encode_claims/decode_claims

This patch refactors the existing JWT methods (generate_jwt, check_jwt,
decode_jwt) to be thin wrappers around encode_claims/decode_claims,
eliminating the private _gen_jwt, _chk_jwt, and _decode_jwt functions.

The generate() and check() dispatcher methods are also updated to use
the new general methods directly.

This makes encode_claims/decode_claims the single source of truth for
JWT operations, with the id-based methods as a convenience layer on top.

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
   k$ prove t/Token.t t/Koha/Token.t
=> SUCCESS: Tests pass (both old and new tests)
3. Existing JWT behavior preserved (generate_jwt, check_jwt, decode_jwt
   all produce identical results)
4. Sign off :-D

-- 
You are receiving this mail because:
You are the assignee for the bug.
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