Compare commits

..

12 Commits

Author SHA1 Message Date
Dave Mc Nicoll
81e124b144 - Added getenvonce 2026-06-01 15:23:49 +00:00
Dave Mc Nicoll
9cd6f10d7e - Merged with master done 2026-06-01 15:23:48 +00:00
Dave Mc Nicoll
a36dbeeef2 - Fixed conflicts 2026-06-01 15:23:42 +00:00
7ed88ec89f - Added createStream methods and fixed multiple errors views 2026-06-01 15:23:11 +00:00
c6e9bb6a38 - Added MethodNotAllowed interface 2026-06-01 15:23:04 +00:00
Dave Mc Nicoll
e934c1a92c -Rebasing 2026-06-01 15:23:04 +00:00
baf6fdf952 - Added createStream methods and fixed multiple errors views 2026-06-01 15:23:03 +00:00
Dave Mc Nicoll
e0da7ae734 - Merged with master done 2026-06-01 15:22:54 +00:00
Dave Mc Nicoll
64f273e65c - Rebased 2026-06-01 15:22:54 +00:00
Dave Mc Nicoll
9031236930 - WIP on ulmus-user mechanics updates 2026-06-01 15:22:54 +00:00
7ee4b2d8bb - Added createStream methods and fixed multiple errors views 2026-06-01 15:22:38 +00:00
06c4f46486 - Added MethodNotAllowed interface 2026-06-01 15:21:56 +00:00
6 changed files with 17 additions and 6 deletions

View File

@ -4,6 +4,7 @@ use Lean\Factory\HttpFactoryInterface;
use Ulmus\User\{Authorize\HeaderAuthentication,
Entity,
Lib\Authenticate,
Lib\Authorize,
Middleware\AuthenticationMiddleware,
@ -12,12 +13,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')),
@ -47,6 +48,7 @@ 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,3 +1,13 @@
<?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,7 +32,6 @@ 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);
}
}