More authentication refactoring to also provide "plugable" credentials handling (references #921, needed for #305)

This commit is contained in:
Bernd Bestel
2020-10-19 18:38:12 +02:00
parent 9f88dd3af3
commit 94214b867a
9 changed files with 81 additions and 52 deletions

View File

@@ -11,9 +11,7 @@ require_once __DIR__ . '/vendor/autoload.php';
// Load config files
require_once GROCY_DATAPATH . '/config.php';
require_once __DIR__ . '/config-dist.php';
// For not in own config defined values we use the default ones
require_once __DIR__ . '/config-dist.php'; // For not in own config defined values we use the default ones
// Definitions for dev/demo/prerelease mode
if ((GROCY_MODE === 'dev' || GROCY_MODE === 'demo' || GROCY_MODE === 'prerelease') && !defined('GROCY_USER_ID'))
@@ -41,9 +39,6 @@ $container = $app->getContainer();
$container->set('view', function (Container $container) {
return new Slim\Views\Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache');
});
$container->set('LoginControllerInstance', function (Container $container) {
return new LoginController($container, 'grocy_session');
});
$container->set('UrlManager', function (Container $container) {
return new UrlManager(GROCY_BASE_URL);
});