wai-middleware-auth-0.1.2.0: Authentication middleware that secures WAI application

Safe HaskellNone
LanguageHaskell2010

Network.Wai.Auth.Executable

Synopsis

Documentation

mkMain Source #

Arguments

:: AuthConfig

Use readAuthConfig to read config from a file.

-> [ProviderParser]

Parsers for supported providers. ProviderParser can be created with mkProviderParser.

-> (Port -> Application -> IO ())

Application runner, for instance Warp's run function.

-> IO () 

Construct a main function.

Since: 0.1.0

readAuthConfig :: FilePath -> IO AuthConfig Source #

Read configuration from a yaml file with ability to use environment variables. See Data.Yaml.Config module for details.

Since: 0.1.0

serviceToApp :: Service -> IO Application Source #

Create an Application from a Service

Since: 0.1.0

data AuthConfig Source #

Configuration for wai-auth executable and any other, that is created using mkMain

Constructors

AuthConfig 

Fields

data SecretKey Source #

Configuration for a secret key that will be used to encrypt authenticated user as client side cookie.

Constructors

SecretKeyFile FilePath

Path to a secret key file in binary form, if it is malformed or doesn't exist it will be (re)created. If empty "client_session_key.aes" name will be used

SecretKey Key

Serialized and base64 encoded form of a secret key. Use encodeKey to get a proper encoded form.

data Service Source #

Available services.

data FileServer Source #

Configuration for reverse proxy application.

Constructors

FileServer 

Fields

data ReverseProxy Source #

Configuration for reverse proxy application.

Constructors

ReverseProxy 

Fields

encodeKey :: Key -> ByteString Source #

Serialize and base64 encode a secret Key

decodeKey :: ByteString -> Either String Key Source #

Decode a Key that is in a base64 encoded serialized form

type Port = Int Source #