Scope
Port Bun corpus position 4020, js/third_party/jsonwebtoken/jwt.asymmetric_signing.test.js.
Acceptance criteria
- RSA, RSA-PSS, and copied EC signing fixtures produce syntactically valid three-part tokens with correct headers.
- Matching public keys verify; mismatched public keys fail in synchronous and callback paths.
- Malformed tokens and tokens with extra segments fail deterministically; decode-only behavior remains unchanged.
- RSA/EC algorithm-key mismatches honor
allowInvalidAsymmetricKeyTypeswithout weakening normal validation. - Expiration behavior and concrete JWT error subclasses remain correct.
- Signature failures retain claim/operation metadata, original cause, and operation-aware cause stacks.
- Focused, prior RSA-policy, adjacent JWT, and permanent diagnostics pass.