servant-auth-0.4.0.0: Authentication combinators for servant
Servant.Auth.JWT
class FromJWT a where Source #
How to decode data from a JWT.
The default implementation assumes the data is stored in the unregistered dat claim, and uses the FromJSON instance to decode value from there.
dat
FromJSON
Minimal complete definition
Nothing
Methods
decodeJWT :: ClaimsSet -> Either Text a Source #
decodeJWT :: FromJSON a => ClaimsSet -> Either Text a Source #
class ToJWT a where Source #
How to encode data from a JWT.
The default implementation stores data in the unregistered dat claim, and uses the type's ToJSON instance to encode the data.
ToJSON
encodeJWT :: a -> ClaimsSet Source #
encodeJWT :: ToJSON a => a -> ClaimsSet Source #