static function (ContainerInterface $container) { return new AuthMiddleware( $container->get(FormAuthHandler::class), $container->get(ResponseFactoryInterface::class), $container->get(LoggerInterface::class) ); }, FormAuthHandler::class => static function (ContainerInterface $container) { return new FormAuthHandler( $container->get(UserProviderInterface::class), $container->get(SessionStorageInterface::class), [ 'login_path' => $container->get('auth.form_login_path'), 'login_key' => $container->get('auth.form_login_key'), 'password_key' => $container->get('auth.form_password_key'), 'on_failure' => $container->get('auth.form_on_failure') ] ); }, ]; } public function getParameters(): array { return [ 'auth.form_login_path' => '/login', 'auth.form_login_key' => '_username', 'auth.form_password_key' => '_password', 'auth.form_on_failure' => null ]; } public function getRoutes(): array { return []; } public function getControllerSources(): array { return []; } public function getListeners(): array { return []; } public function getCommandSources(): array { return [ AuthPasswordHashCommand::class ]; } }