summaryrefslogtreecommitdiff
path: root/fig-web/src/Fig/Web/Utils.hs
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2024-11-14 21:20:28 -0500
committerLLLL Colonq <llll@colonq>2024-11-14 21:20:28 -0500
commita3991ddb8f61955c5c48ac99b6eed14d5e9f986a (patch)
treeb58d9a4beeeca61547d1ae3696d64fc2e2561ab4 /fig-web/src/Fig/Web/Utils.hs
parentd6bcaac870a03ed7ee0e6e1d6981e15f16778e2b (diff)
Account creation in LDAP using Twitch
Diffstat (limited to 'fig-web/src/Fig/Web/Utils.hs')
-rw-r--r--fig-web/src/Fig/Web/Utils.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/fig-web/src/Fig/Web/Utils.hs b/fig-web/src/Fig/Web/Utils.hs
index b6c385a..004ba5a 100644
--- a/fig-web/src/Fig/Web/Utils.hs
+++ b/fig-web/src/Fig/Web/Utils.hs
@@ -25,17 +25,27 @@ instance Exception FigWebException
data Config = Config
{ port :: !Int
+ , assetPath :: !FilePath
, clientId :: !Text
, authToken :: !Text
, dbHost :: !Text
+ , lldapCli :: !FilePath
+ , lldapHost :: !Text
+ , lldapUser :: !Text
+ , lldapPassword :: !Text
} deriving (Show, Eq, Ord)
configCodec :: Toml.TomlCodec Config
configCodec = do
port <- Toml.int "port" Toml..= (\a -> a.port)
+ assetPath <- Toml.string "asset_path" Toml..= (\a -> a.assetPath)
clientId <- Toml.text "client_id" Toml..= (\a -> a.clientId)
authToken <- Toml.text "auth_token" Toml..= (\a -> a.authToken)
dbHost <- Toml.text "db_host" Toml..= (\a -> a.dbHost)
+ lldapCli <- Toml.string "lldap_cli" Toml..= (\a -> a.lldapCli)
+ lldapHost <- Toml.text "lldap_host" Toml..= (\a -> a.lldapHost)
+ lldapUser <- Toml.text "lldap_user" Toml..= (\a -> a.lldapUser)
+ lldapPassword <- Toml.text "lldap_password" Toml..= (\a -> a.lldapPassword)
pure $ Config{..}
loadConfig :: FilePath -> IO Config