You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Danny Bessems 635b96c72e Update '' 3 years ago
include Added UI elements for managing sessions 3 years ago
public Added UI elements for managing sessions 3 years ago Periodic merge upstream (#1) 4 years ago Update '' 3 years ago
lucidAuth.config.php.example Added initial config for TOTP; for use with the Spomky-Labs/otphp class 3 years ago


Respect the unexpected, mitigate your risks

Forward Authentication for use with proxies (caddy, nginx, traefik, etc)


  • Create a new folder, navigate to it in a commandprompt and run the following command:
    git clone

  • Edit include/lucidAuth.config.php.example to reflect your configuration and save as include/lucidAuth.config.php

  • Create a new website (within any php-capable webserver) and make sure that the documentroot points to the public folder

  • Check if you are able to browse to https://<fqdn>/lucidAuth.login.php (where <fqdn> is the actual domain -or IP address- your webserver is listening on)

  • Edit your proxy's configuration to use the new website as forward proxy:

    in Caddy/nginx (planned for a later stage)

    in Traefik

    Add the following lines (change to reflect your existing configuration):

      entrypoints = ["https"]
      backend = "server1"
        address = "https://<fqdn>/lucidAuth.validateRequest.php"
          rule = "Host:<fqdn>"

    Either whitelist IP's which should be trusted to send HTTP_X-Forwarded-* headers, ór enable insecure-mode in your static configuration:

        address: :443
            - ""
            - ""
    #      insecure: true

    Define a middleware that tells Traefik to forward requests for authentication in your dynamic file provider:

            address: "https://<fqdn>/lucidAuth.validateRequest.php"
            trustForwardHeader: true

    And finally add the new middleware to your service (different methods; this depends on your configuration):

    # as a label (when using Docker provider)
    traefik.http.routers.router1.middlewares: "ldap-authentication@file"
    # as yaml (when using file provider)
          - "ldap-authentication"
  • Important!

    The domainname of the website made in step 3, needs to match the domainname (ignoring subdomains, if any) of the resource utilizing this authentication proxy.

Questions or bugs

Feel free to open issues in this repository.