Scope
Port Bun corpus position 4002, js/third_party/jsonwebtoken/async_sign.test.js.
Acceptance criteria
jwt.signsupports callback forms with and without an options object.- Async and sync signing return equivalent tokens for equivalent inputs.
none, RSA, and PS algorithm validation matches the copied suite, including minimum RSA modulus policy andallowInsecureKeySizes.- Temporal claims honor
mutatePayload, invalid arguments reach callbacks, and falsy secrets return the expected error. jws.decodeexposes the original payload text.- Async failures retain algorithm/operation context, original causes, and readable stacks in the permanent diagnostic gate.