class Monad m => MonadJwt m where
mkJwtToken :: Int -> JwtPayload Text -> m JwtToken
verifyJwtToken :: JwtToken -> m (Maybe (JwtPayload Text))
I propose to add one more parameter to it, like this:
class Monad m => MonadJwt payload m where
mkJwtToken :: Int -> JwtPayload payload -> m JwtToken
verifyJwtToken :: JwtToken -> m (Maybe (JwtPayload payload))
This approach should allow to handle different types of payloads and have multiple instances for a single monad.
Currently
MonadJwt
typeclass looks like this:I propose to add one more parameter to it, like this:
This approach should allow to handle different types of payloads and have multiple instances for a single monad.
What do you think?