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

Safe HaskellNone
LanguageHaskell2010

Network.Wai.Auth.Executable

Synopsis

Documentation

mkMain #

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 #

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 #

Create an Application from a Service

Since: 0.1.0

data AuthConfig #

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

Constructors

AuthConfig 

Fields

data SecretKey #

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 #

Available services.

data FileServer #

Configuration for reverse proxy application.

Constructors

FileServer 

Fields

data ReverseProxy #

Configuration for reverse proxy application.

Constructors

ReverseProxy 

Fields

encodeKey :: Key -> ByteString #

Serialize and base64 encode a secret Key

decodeKey :: ByteString -> Either String Key #

Decode a Key that is in a base64 encoded serialized form

type Port = Int #