21 lines
596 B
Haskell
21 lines
596 B
Haskell
{-# Language TypeApplications #-}
|
|
|
|
module Main (main) where
|
|
|
|
import UniWorX
|
|
import Server
|
|
import Control.Applicative ((<|>))
|
|
import System.Environment (lookupEnv)
|
|
import qualified Data.Map as M
|
|
|
|
main :: IO ()
|
|
main = do
|
|
port <- determinePort
|
|
putStrLn $ "Try: http://localhost:" ++ show port ++ "/auth?scope=ID%20Profile&client_id=42&response_type=code&redirect_uri=http:%2F%2Flocalhost:0000%2F"
|
|
runMockServer port testUsers
|
|
where
|
|
determinePort :: IO Int
|
|
determinePort = do
|
|
Just port <- (read @Int <$> lookupEnv "OAUTH2_SERVER_PORT") <|> Just 9443
|
|
return port
|