Authentication service for
nginx's
ngx_http_auth_request_module
or traefik's ForwardAuth middleware
,
verifying that session cookies are valid and allowing users to log in
using a
htpasswd
file.
This program uses Revel, a Golang web framework.
revel run .
The configurations are in the file conf/app.conf.
Some parameters can be passed as environment variables, which is useful on Docker.
# Auth url (default blank)
HTPA_AUTHURL
# Username header (default blank)
HTPA_USERNAMEHEADER
# htpassword file name [REQUIRED] (default blank)
HTPA_HTPASSWDFILE
# Cookie name (default: htpa_auth)
HTPA_COOKIENAME
# Cookie domain (default blank)
HTPA_COOKIEDOMAIN
# Cookie expire minutes (default: 24 hours)
HTPA_COOKIEEXPIREMINUTES
# Cookie check cache time in minutes (default: 10 minutes - <= 0 to disable)
HTPA_COOKIECHECKCACHEMINUTES