- Fixed conflicts

This commit is contained in:
Dave Mc Nicoll 2026-05-21 15:09:20 +00:00
parent adfd619c5f
commit abe94e498f
3 changed files with 45 additions and 17 deletions

View File

@ -2,12 +2,14 @@
use Lean\Factory\HttpFactoryInterface; use Lean\Factory\HttpFactoryInterface;
use Ulmus\User\{ use Ulmus\User\{Authorize\HeaderAuthentication,
Authorize\HeaderAuthentication, Authorize\PostRequestAuthentication,
Entity, Entity,
Lib\Authenticate, Lib\Authorize, Lib\Authenticate,
Middleware\AuthenticationMiddleware, Middleware\HeaderAuthenticationMiddleware, Middleware\PostRequestAuthenticationMiddleware, Lib\Authorize,
}; Middleware\AuthenticationMiddleware,
Middleware\HeaderAuthenticationMiddleware,
Middleware\PostRequestAuthenticationMiddleware,
Authorize\PostRequestAuthentication};
use Picea\Picea; use Picea\Picea;
use Storage\{ Cookie, Session }; use Storage\{ Cookie, Session };
@ -15,6 +17,7 @@ use Psr\Container\ContainerInterface;
use function DI\{get, autowire, create}; use function DI\{get, autowire, create};
return [ return [
Authorize::class => create(Authorize::class)->constructor(get(Entity\UserInterface::class), get(Session::class), get(Cookie::class), get('authentication.method')), Authorize::class => create(Authorize::class)->constructor(get(Entity\UserInterface::class), get(Session::class), get(Cookie::class), get('authentication.method')),

View File

@ -39,4 +39,37 @@ class ApplicationStrategy extends Strategy\ApplicationStrategy {
{ {
return $this->getContainer()->has(MethodNotAllowedInterface::class) ? $this->getContainer()->get(MethodNotAllowedInterface::class) : parent::getMethodNotAllowedDecorator($exception); return $this->getContainer()->has(MethodNotAllowedInterface::class) ? $this->getContainer()->get(MethodNotAllowedInterface::class) : parent::getMethodNotAllowedDecorator($exception);
} }
/*
<<<<<<< HEAD
public function getMethodNotAllowedDecorator(MethodNotAllowedException $exception): MiddlewareInterface
{
return $this->getContainer()->has(MethodNotAllowedInterface::class) ? $this->getContainer()->get(MethodNotAllowedInterface::class) : parent::getMethodNotAllowedDecorator($exception);
=======
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
if (php_sapi_name() !== 'cli' and ! defined('STDIN')) {
return $this->throw404($request);
}
return $handler->handle($request);;
}
public function throw404(ServerRequestInterface $request) : ResponseInterface
{
if ( getenv('DEBUG') && $this->di->has(\Picea\Asset\Asset::class) ) {
$params = $request->getServerParams();
$scpName = basename(explode('?', $params['REQUEST_URI'] ?? "", 2)[0]);
list(, $ext) = array_pad(explode('.', $scpName), 2, null);
if ($ext && in_array($ext, ApplicationStrategy::ASSET_TRIGGER_UPDATE)) {
$this->di->get(\Picea\Asset\Asset::class)->launchInstall();
}
}
return $this->di->get('error.404');
}
};
>>>>>>> af8b686 (- WIP on ulmus-user mechanics updates)
}*/
} }

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 40 KiB