Compare commits

..

No commits in common. "81e124b144b4d5a1d67ae96f05b648ef4e1c5927" and "01d48463b318d2174f8391e30b7f8da62e49717a" have entirely different histories.

6 changed files with 6 additions and 17 deletions

View File

@ -4,7 +4,6 @@ use Lean\Factory\HttpFactoryInterface;
use Ulmus\User\{Authorize\HeaderAuthentication,
Entity,
Lib\Authenticate,
Lib\Authorize,
Middleware\AuthenticationMiddleware,
@ -13,12 +12,12 @@ use Ulmus\User\{Authorize\HeaderAuthentication,
Authorize\PostRequestAuthentication};
use Picea\Picea;
use Storage\{ Cookie, Session };
use Psr\Container\ContainerInterface;
use function DI\{get, autowire, create};
return [
Authorize::class => create(Authorize::class)->constructor(get(Entity\UserInterface::class), get(Session::class), get(Cookie::class), get('authentication.method')),
@ -48,7 +47,6 @@ return [
'authentication.error' => function($c, Picea $picea) {
return function($message) use ($c, $picea) {
return $c->get(HttpFactoryInterface::class)::createHtmlResponse($picea->renderHtml('lean/error/500', [
'title' => "Authentication failed",
'subtitle' => "",
'message' => $message,

View File

@ -1,13 +1,3 @@
<?php
if (! function_exists('getenvonce')) {
function getenvonce(string $name) : array|string|false
{
$value = getenv($name);
unset($_ENV[$name], $_SERVER[$name]);
putenv($name . "=");
return $value;
}
}
return require("env/" . ( getenv('APP_ENV') ?? 'prod' ) . ".php");

View File

@ -32,6 +32,7 @@ class ApplicationStrategy extends Strategy\ApplicationStrategy {
public function getThrowableHandler(): MiddlewareInterface
{
return $this->getContainer()->get(ThrowableHandlerInterface::class);
}
public function getMethodNotAllowedDecorator(MethodNotAllowedException $exception): MiddlewareInterface

View File

@ -63,6 +63,6 @@ class HttpFactory implements HttpFactoryInterface
public static function createStream(string $content): StreamInterface
{
return new StreamFactory()->createStream($content);
return (new StreamFactory())->createStream($content);
}
}