summaryrefslogtreecommitdiff
path: root/overlays/spm/server/Spm/Server.hs
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2025-11-21 14:51:23 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2025-11-21 14:51:23 +0100
commit4c46e82769847177f6582447f027a56f9b555fd0 (patch)
treec797e1ecf691e8e05399d83ad3042c52ac08111e /overlays/spm/server/Spm/Server.hs
parent4341d2d9b0e5d57adf676bfad3d39cefdf7eca6f (diff)
downloadnixos-4c46e82769847177f6582447f027a56f9b555fd0.tar
nixos-4c46e82769847177f6582447f027a56f9b555fd0.tar.gz
nixos-4c46e82769847177f6582447f027a56f9b555fd0.tar.bz2
nixos-4c46e82769847177f6582447f027a56f9b555fd0.tar.xz
nixos-4c46e82769847177f6582447f027a56f9b555fd0.zip
...
Diffstat (limited to 'overlays/spm/server/Spm/Server.hs')
-rw-r--r--overlays/spm/server/Spm/Server.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/overlays/spm/server/Spm/Server.hs b/overlays/spm/server/Spm/Server.hs
index 8e7f8786..dc334729 100644
--- a/overlays/spm/server/Spm/Server.hs
+++ b/overlays/spm/server/Spm/Server.hs
@@ -1,3 +1,5 @@
1{-# OPTIONS_GHC -Wno-orphans #-}
2
1{-# LANGUAGE OverloadedStrings #-} 3{-# LANGUAGE OverloadedStrings #-}
2 4
3module Spm.Server 5module Spm.Server
@@ -24,7 +26,6 @@ import Data.Attoparsec.Text
24import qualified Data.ByteString.Lazy as LBS 26import qualified Data.ByteString.Lazy as LBS
25 27
26import GHC.Generics (Generic) 28import GHC.Generics (Generic)
27import Type.Reflection (Typeable)
28 29
29import Control.Applicative 30import Control.Applicative
30import Control.Monad 31import Control.Monad
@@ -101,7 +102,7 @@ hSslClientSDn = "SSL-Client-S-DN"
101data SSLClientVerify 102data SSLClientVerify
102 = SSLClientVerifySuccess 103 = SSLClientVerifySuccess
103 | SSLClientVerifyOther Text 104 | SSLClientVerifyOther Text
104 deriving (Eq, Ord, Read, Show, Generic, Typeable) 105 deriving (Eq, Ord, Read, Show, Generic)
105instance FromHttpApiData SSLClientVerify where 106instance FromHttpApiData SSLClientVerify where
106 parseUrlPiece = (left Text.pack .) . parseOnly $ p <* endOfInput 107 parseUrlPiece = (left Text.pack .) . parseOnly $ p <* endOfInput
107 where 108 where
@@ -163,7 +164,7 @@ data ServerCtxError
163 | ServerCtxNoCredentialsDirectory 164 | ServerCtxNoCredentialsDirectory
164 | ServerCtxJwkSetDecodeError String 165 | ServerCtxJwkSetDecodeError String
165 | ServerCtxJwkSetEmpty 166 | ServerCtxJwkSetEmpty
166 deriving stock (Eq, Ord, Read, Show, Generic, Typeable) 167 deriving stock (Eq, Ord, Read, Show, Generic)
167 deriving anyclass (Exception) 168 deriving anyclass (Exception)
168 169
169mkSpmApp :: (MonadUnliftIO m, MonadThrow m) => m Application 170mkSpmApp :: (MonadUnliftIO m, MonadThrow m) => m Application