summaryrefslogtreecommitdiff
path: root/overlays/spm/lib/Crypto/JWT/Instances.hs
blob: fa3c83b041947600a1952952e45608a153c8f586 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{-# OPTIONS_GHC -fno-warn-orphans #-}

module Crypto.JWT.Instances () where

import Prelude
import Control.Arrow

import Crypto.JWT
import Servant.API.ContentTypes


instance MimeRender PlainText SignedJWT where
  mimeRender _ = encodeCompact

instance MimeRender OctetStream SignedJWT where
  mimeRender _ = encodeCompact

instance MimeUnrender PlainText SignedJWT where
  mimeUnrender _ = left (show @Error) . decodeCompact

instance MimeUnrender OctetStream SignedJWT where
  mimeUnrender _ = left (show @Error) . decodeCompact