Changelog for jose-0.12
Version 0.12 (2025-08-18)
-
GHC 9.6 is now the earliest supported version.
-
Changed the header protection data types for better ergonomics (#125). Previously,
()was used for serialisations that only support protected headers (thus, a single constructor). This release introduces the new singleton data typeRequiredProtectedto replace the use of()for this purpose. This is a breaking change and some library users will need to update their code.The
Protectiontype has been renamed toOptionalProtection, with the old name retained as a (deprecated) type synonym.The
ProtectionIndicatorclass has been renamed toProtectionSupport, with the old name retained as a (deprecated) type synonym.Added some convenience header and header parameter constructors:
newJWSHeaderProtected,newHeaderParamProtectedandnewHeaderParamUnprotected. -
Generalised the types of
signJWT,verifyJWTand related functions to accept custom JWS header types. Added new type synonymSignedJWTWithHeader h. This change could break some applications by introducing ambiguity. The solution is to use a type annotation, type application, or explicit coercion function, as in the below examples:-- type application {-# LANGUAGE TypeApplications #-} decodeCompact @SignedJWT s >>= verifyClaims settings k -- type annotation do jwt <- decodeCompact s verifyClaims settings k (jwt :: SignedJWT) -- coercion function let fixType = id :: SignedJWT -> SignedJWT in verifyClaims settings k . fixType =<< decodeCompact s -
Added
unsafeGetPayload,unsafeGetJWTPayloadandunsafeGetJWTClaimsSetfunctions. These enable access to the JWS/JWT payload without cryptographic verification. As the name implies, these should be used with the utmost caution! (#126) -
Add
Crypto.JOSE.JWK.negotiateJWSAlgwhich chooses the cryptographically strongest JWS algorithm for a given key, restricted to a given set of algorithms. (#118) -
Added new conversion functions
Crypto.JOSE.JWK.fromX509PubKeyandCrypto.JOSE.JWK.fromX509PrivKey. These convert from theData.X509.PubKeyandData.X509.PrivKeytypes, which can be read via the crypton-x509-store package. They supports RSA, NIST ECC, and Edwards curve key types (Ed25519, Ed448, X25519, X448). -
Updated
Crypto.JOSE.JWK.fromX509Certificateto support Edwards curve key types (Ed25519, Ed448, X25519, X448). -
Added
Crypto.JOSE.JWK.fromRSAPublic :: RSA.PublicKey -> JWK. -
Added
Ordinstance forStringOrURI(#134; contributed by Chris Penner). -
Added
SemigroupandMonoidinstances forJWKSet(#135; contributed by Torgeir Strand Henriksen).
Version 0.11 (2023-10-31)
-
Migrate to the crypton library ecosystem. crypton was a hard fork of cryptonite, which was no longer maintained. With this change, the minimum supported version of GHC increased to 8.8. There are no other notable changes in this release.
-
The
v0.10series is the last release series to support cryptonite. It will continue to receive important bug fixes until the end of 2024.
Version 0.10 (2022-09-01)
-
Introduce
newtype JOSE e m awhich behaves likeExceptT e m abut also hasinstance (MonadRandom m) => MonadRandom (JOSE e m). The orphanMonadRandominstances were removed. (#91) -
Parameterise
JWTover the claims data type. This is a cleaner mechanism to support applications that use additional claims beyond those registered by RFC 7519.unregisteredClaimsandaddClaimare deprecated and will be removed in a future release. (#39) -
Add Ed448 and X448 support. (#74)
-
Add secp256k1 curve support (RFC 8812).
-
Added
checkJWK :: (MonadError e m, AsError e) => JWK -> m (). This action performs some key usability checks. In particular it identifies too-small symmetric keys. (#46) -
Removed
QuickCheckinstances. jose no longer depends onQuickCheck. (#106) -
Removed orphan
ToJSONandFromJSONinstances forURI. -
Fail signature verification when curve does not match algorithm. This is an additional defence against curve substitution attacks.
-
Improved error reporting when constructing a JWK from an X.509 certificate with ECDSA key.
-
Make compatible with
mtl == 2.3.*(#107) -
Make compatible with
monad-time == 0.4
Older versions
See Git commit history