Skip to content

inviron/htpasswd-auth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A nginx auth_request and traefik ForwardAuth authentication service, based on cookies and htpasswd.

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.

Installation

revel run .

Configuration

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

Author

Rangel Reale

About

htpasswd-auth

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 50.4%
  • Go 47.0%
  • Dockerfile 2.0%
  • Batchfile 0.6%