jwt-kit icon indicating copy to clipboard operation
jwt-kit copied to clipboard

Version 4 to Version 5 Migration Deprecations

Open dimitribouniol opened this issue 1 year ago • 2 comments

This PR adds migration deprecations for many common APIs between version 4 and version 5 that should help most users (particularly those using ECDSA keys and standard JWTs) migrate from version 4 to version 5 by following warnings. Crucially, it allows libraries that rely on the same requirements (for instance, https://github.com/apple/app-store-server-library-swift and https://github.com/m-barthelemy/AcmeSwift) to allow for a range of versions such as "4.14.0" ..< "6.0.0".

If we agree with the proposed updates here, a few more things should be done:

  • Cut a new minor v4 version, specifically 4.14.0, so users can opt out of the warnings should they wish to.
  • Add an entry to main's README explaining the process to update from v4 to v5.
  • Update v5 with an AsyncJWTPayload typealias back to JWTPayload that is itself deprecated, to fully support libraries that wish to be compatible with v4 and v5.
  • Make a similar but smaller PR to jwt for vapor to move folks away from signers and onto keys (otherwise they are still forced into an all or nothing update since they will still be stuck with JWTSigners).

Note that I didn't make compatibility APIs for every type — if someone feels they are necessary due to a library requiring them, I figured we could add more support in a future PR.

dimitribouniol avatar Nov 20 '24 13:11 dimitribouniol

Added a couple of brief comments. There's also a failing test we need to investigate

0xTim avatar Dec 01 '24 13:12 0xTim

Still need to fix the tests, but let me get PRs for the other pieces in place before we merge so they can go in all at once

dimitribouniol avatar Dec 07 '24 07:12 dimitribouniol