Closed haishengwu-okta closed 7 years ago
It cannot be implemented because a JWSHeader
maps to two JSON objects: the unprotected header, and the protected header (which gets base64url-encoded).
There are instances HasParams a => FromJSON (Signature a)
and HasParams a => ToJSON (Signature a)
for working with signatures which are "one layer out", and which perform the proper processing of unprotected and protected header parameters.
What is your use case that requires aeson instances for the JWSHeader
type directly?
I'm trying to use the JOSE.JWK.verify
which needs an Alg
from the JWT header.
I guess JOSE.Compact.decodeCompact
is the right one I shall use. Thanks!
Yes, JWT is a whole other issue... JWT is defined to use only the compact serialisation, so there's no aeson instances for JWT.
https://hackage.haskell.org/package/jose-0.5.0.1/docs/Crypto-JOSE-JWS.html#t:JWSHeader
any particular reason it is not yet?