wai-middleware-auth alternatives and similar packages
Based on the "wai" category.
Alternatively, view wai-middleware-auth alternatives based on common mentions on social networks and blogs.
-
wai-middleware-consul
Wai Middleware for Consul -
wai-middleware-static
WAI middleware that intercepts requests to static files and serves them if they exist. -
wai-middleware-throttle
WAI Request Throttling Middleware -
wai-middleware-metrics
WAI middleware that collects requests metrics -
wai-middleware-rollbar
Middleware that communicates to Rollbar. -
wai-cli
Command line runner for Wai apps (using Warp) with TLS, CGI, socket activation & graceful shutdown | now on https://codeberg.org/unrelentingtech/wai-cli -
wai-enforce-https
Enforce HTTPS in Wai server app safely. -
wai-middleware-crowd
Middleware and utilities for using Atlassian Crowd authentication -
wai-session-postgresql
WAI Session that keeps its data in a PostgreSQL database -
wai-util
Utility functions for WAI that haven't found another home yet -
wai-middleware-preprocessor
WAI middleware for static file preprocessors -
wai-middleware-etag
WAI ETag middleware for static files -
wai-session-clientsession
Session store based on clientsession -
wai-session-tokyocabinet
Session store based on Tokyo Cabinet -
wai-middleware-headers
addHeaders and cors for Haskell's Network.Wai -
wai-middleware-caching
WAI Middleware to cache (contains generic, LRUCache and Redis Cache backend) -
wai-middleware-hmac
WAI HMAC Authentication Middleware and Client -
wai-middleware-delegate
A WAI middleware that enables proxying WAI requests to another server. -
wai-middleware-json-errors
Convert errors to json -
wai-middleware-static-caching
WAI middleware that intercepts requests to static files and serves them if they exist. -
wai-hastache
Nice wrapper around hastache for use with WAI -
wai-feature-flags
Feature flag support for WAI applications. -
wai-middleware-static-embedded
Serve static files embedded in your executable as a wai middleware. -
wai-git-http
Haskell Wai Application for git http-backend -
wai-digestive-functors
Helpers to bind digestive-functors onto wai requests -
wai-middleware-travisci
WAI middleware for authenticating webhook payloads from Travis CI -
wai-logger-buffered
A buffered logger for wai applications -
wai-middleware-slack-verify
WAI Slack request verification middleware -
wai-handler-snap
Web Application Interface handler using snap-server. (deprecated)
Static code analysis for 29 languages.
Do you think we are missing an alternative of wai-middleware-auth or a related project?
README
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 executable 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, GitHub, and GitLab
authentication on http://localhost:3000
:
app_root: "_env:APPROOT:http://localhost:3000"
app_port: 3000
cookie_age: 3600
secret_key: "...+vwscbKR4DyPT"
file_server:
root_folder: "/path/to/html/files"
redirect_to_index: true
add_trailing_slash: true
providers:
github:
client_id: "...94cc"
client_secret: "...166f"
app_name: "Dev App for wai-middleware-auth"
email_white_list:
- "^[a-zA-Z0-9._%+-][email protected]$"
google:
client_id: "...qlj.apps.googleusercontent.com"
client_secret: "...oxW"
email_white_list:
- "^[a-zA-Z0-9._%+-][email protected]$"
gitlab:
client_id: "...9cfc"
client_secret: "...f0d0"
app_name: "Dev App for wai-middleware-auth"
email_white_list:
- "^[a-zA-Z0-9._%+-][email protected]$"
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/gitlab apps, eg:
http://localhost:3000/_auth_middleware/google/complete
.
After configuration file is ready, running application is very easy:
$ wai-auth --config-file=/path/to/config.yaml
Listening on port 3000
Reverse proxy
To use a reverse proxy instead of a file server, replace file_server
with
reverse_proxy
, eg:
reverse_proxy:
host: myapp.example.com
port: 80
Self-hosted GitLab
The GitLab provider also supports using a self-hosted GitLab instance by
setting the gitlab_host
field. In this case you may also want to override
the provider_info
to change the title, logo, and description. For example:
providers:
gitlab:
gitlab_host: gitlab.mycompany.com
client_id: "...9cfc"
client_secret: "...f0d0"
app_name: "Dev App for wai-middleware-auth"
email_white_list:
- "^[a-zA-Z0-9._%+-][email protected]$"
provider_info:
title: My Company's GitLab
logo_url: https://mycompany.com/logo.png
descr: Use your My Company GitLab account to access this page.