summaryrefslogtreecommitdiff
path: root/overlays/spm/lib/Crypto/JWT/Instances.hs
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-05-26 13:58:07 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2022-05-26 13:58:07 +0200
commitfc6cf6169868e60c189e4b243330c3717ff159f3 (patch)
tree3f6dea9c1420e23756257b5abea27ec9ed92d58a /overlays/spm/lib/Crypto/JWT/Instances.hs
parent84f2affd66a0ff3947b91a30308cb8e6a8ff7594 (diff)
downloadnixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar
nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar.gz
nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar.bz2
nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.tar.xz
nixos-fc6cf6169868e60c189e4b243330c3717ff159f3.zip
...
Diffstat (limited to 'overlays/spm/lib/Crypto/JWT/Instances.hs')
-rw-r--r--overlays/spm/lib/Crypto/JWT/Instances.hs22
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
3module Crypto.JWT.Instances () where
4
5import Prelude
6import Control.Arrow
7
8import Crypto.JWT
9import Servant.API.ContentTypes
10
11
12instance MimeRender PlainText SignedJWT where
13 mimeRender _ = encodeCompact
14
15instance MimeRender OctetStream SignedJWT where
16 mimeRender _ = encodeCompact
17
18instance MimeUnrender PlainText SignedJWT where
19 mimeUnrender _ = left (show @Error) . decodeCompact
20
21instance MimeUnrender OctetStream SignedJWT where
22 mimeUnrender _ = left (show @Error) . decodeCompact