Treat JWT as a Secret, not String

This commit is contained in:
Joe Nelson
2015-11-19 09:58:41 -08:00
parent 2c3a52fc35
commit 87c946ef52
5 changed files with 12 additions and 9 deletions
+2 -1
View File
@@ -25,6 +25,7 @@ import Network.Wai.Middleware.RequestLogger (logStdout)
import System.IO (BufferMode (..),
hSetBuffering, stderr,
stdin, stdout)
import Web.JWT (secret)
isServerVersionSupported :: H.Session P.Postgres IO Bool
isServerVersionSupported = do
@@ -43,7 +44,7 @@ main = do
conf <- readOptions
let port = configPort conf
unless ("secret" /= configJwtSecret conf) $
unless (secret "secret" /= configJwtSecret conf) $
putStrLn "WARNING, running in insecure mode, JWT secret is the default value"
Prelude.putStrLn $ "Listening on port " ++
(show $ configPort conf :: String)