diff options
Diffstat (limited to 'overlays/spm/lib/Crypto/JWT/Instances.hs')
-rw-r--r-- | overlays/spm/lib/Crypto/JWT/Instances.hs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/overlays/spm/lib/Crypto/JWT/Instances.hs b/overlays/spm/lib/Crypto/JWT/Instances.hs new file mode 100644 index 00000000..fa3c83b0 --- /dev/null +++ b/overlays/spm/lib/Crypto/JWT/Instances.hs | |||
@@ -0,0 +1,22 @@ | |||
1 | {-# OPTIONS_GHC -fno-warn-orphans #-} | ||
2 | |||
3 | module Crypto.JWT.Instances () where | ||
4 | |||
5 | import Prelude | ||
6 | import Control.Arrow | ||
7 | |||
8 | import Crypto.JWT | ||
9 | import Servant.API.ContentTypes | ||
10 | |||
11 | |||
12 | instance MimeRender PlainText SignedJWT where | ||
13 | mimeRender _ = encodeCompact | ||
14 | |||
15 | instance MimeRender OctetStream SignedJWT where | ||
16 | mimeRender _ = encodeCompact | ||
17 | |||
18 | instance MimeUnrender PlainText SignedJWT where | ||
19 | mimeUnrender _ = left (show @Error) . decodeCompact | ||
20 | |||
21 | instance MimeUnrender OctetStream SignedJWT where | ||
22 | mimeUnrender _ = left (show @Error) . decodeCompact | ||