Maintainer's Corner

Readme for wai-middleware-auth-0.1.2.1

wai-middleware-auth

Middleware that secures WAI application

Installation

$ stack install wai-middleware-auth

OR

$ cabal install wai-middleware-auth

wai-auth

Along with middleware this package ships with an executbale wai-auth, which
can function as a protected file server or a reverse proxy. Right from the box
it supports OAuth2 authentication as well as it's custom implementations for
Google and Github.

Configuration is done using a yaml config file. Here is a sample file that will
configure wai-auth to run a file server with google and github authentication
on http://localhost:3000:

Above configuration will also block access to users that don't have an email
with example.com domain. There is also a secret_key field which will be used
to encrypt the session cookie. In order to generate a new random key run this command:

$ echo $(wai-auth key --base64)
azuCFq0zEBkLSXhQrhliZzZD8Kblo...

Make sure you have proper callback/redirect urls registered with google/github
apps, eg: http://localhost:3000/_auth_middleware/google/complete.