Refactor Authentication and add proxy-authentication (#921)

* Refactor Authentication-Middlewares

* Add Proxy-Authentication

* Disable "Logout" & "Manage Users" when using ProxyAuth

* Review

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
fipwmaqzufheoxq92ebc
2020-08-19 19:23:13 +02:00
committed by GitHub
parent 5b475d9307
commit d60d981fd1
10 changed files with 247 additions and 150 deletions

View File

@@ -19,6 +19,7 @@ require_once __DIR__ . '/config-dist.php'; // For not in own config defined valu
if ((GROCY_MODE === 'dev' || GROCY_MODE === 'demo' || GROCY_MODE === 'prerelease') && !defined('GROCY_USER_ID'))
{
define('GROCY_USER_ID', 1);
define('GROCY_SHOW_AUTH_VIEWS', true);
}
// Definitions for disabled authentication mode
@@ -28,6 +29,7 @@ if (GROCY_DISABLE_AUTH === true)
{
define('GROCY_USER_ID', 1);
}
define('GROCY_SHOW_AUTH_VIEWS', false);
}
// Setup base application