Skip to content

v2.2.0-beta

Pre-release
Pre-release
Compare
Choose a tag to compare
@little-apps little-apps released this 02 Jun 06:06

IMPORTANT: This is a beta release and therefore, is not recommended for production systems. If you discover a bug, have a concern, etc., please create an issue.

What's Changed

JWK (JSON Web Key) Handling Improvements

  • JWK is immutable.
  • Random JWK is generated when the phrase is empty.
  • Added getter method for JWK in LittleJWT.
  • Added JWK validator.
  • JWKValidator is resolved using the service container.
  • Improved JWK creation and validation processes.
  • Various changes related to wrapping JWK.
  • Throws IncompatibleHashAlgorithmJWK when an error message is the wrong key type.

Algorithm and Hash Method Changes

  • The algorithm is no longer passed to the hash method but taken by the method.
  • Rearranged parameters for the hash method in JWTHasher.
  • AlgorithmBuilder is responsible for building algorithm instances.

JWT Signing Process Changes

  • Signing is done outside of JsonWebToken.
  • Removed Sign class.
  • The JWK is no longer passed through JsonWebToken via a Sign instance.
  • Signing is handled in the JWTHasher class.
  • The HandlesCreate trait now includes AutoSigns, HandlesCreateSigned, and HandlesCreateUnsigned.
  • Moved createJWTBuilder method into HandlesCreateUnsigned trait.

Container and Dependency Injection Improvements

  • Uses Container type instead of Application.
  • The LittleJWT is created in the container using LittleJWTBuilder.
  • Binds JWK to Container instance.
  • Runs JWK through JWKValidator before LittleJWT is created in the Container.
  • LittleJWTBuilder allows JWKValidator to be specified.
  • The default JWKValidator can be specified using the container.
  • A fallback for when JWK validation fails can be specified.

GitHub Actions and Testing

  • Fixes for GitHub Actions failures.
  • Tests for various JWK creation and validation scenarios.
  • Improved test cases for JWKValidator.

Full Changelog: v2.1.1-beta...v2.2.0-beta