Skip to content

example config for nginx-only auth, using a HTTP POST form

Notifications You must be signed in to change notification settings

rigid/nginx-encrypted-session-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nginx encrypted session auth

This is an example for nginx authentication using a HTTP POST login form without CGI. It covers login/logout/failed login and per-user directories.

Prerequisites:

How it works:

  • auth_request is used to authenticate against another server (which uses auth_basic in itself for the demo)
  • The necessary headers are set for the auth_request (username, password) and taken from an encrypted cookie.
  • The cookie is created in the target of a POST login form
    • if the cookie isn't present, login.html is shown
    • if the cookie is already present (but authentication failed), login-failure.html is shown
    • if the cookie is present and authentication suceeds, the users index.html is shown

About

example config for nginx-only auth, using a HTTP POST form

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages