Generalise the types of signJWT, verifyJWT, and related functions to accept custom JWS header types. Add new type synonym SignedJWTWithHeader h (keeping SignedJWTas is). This change could break some applications by introducing type ambiguity. The solution is to add a type annotation or apply a function like:
fixType = id :: SignedJWT -> SignedJWT
I applied this technique in the test suite to address such ambiguity.
Generalise the types of
signJWT
,verifyJWT
, and related functions to accept custom JWS header types. Add new type synonymSignedJWTWithHeader h
(keepingSignedJWT
as is). This change could break some applications by introducing type ambiguity. The solution is to add a type annotation or apply a function like:I applied this technique in the test suite to address such ambiguity.
Fixes: https://github.com/frasertweedale/hs-jose/issues/122