- Added AdapterProxy autoload in ORM

This commit is contained in:
Dave Mc Nicoll committed 2025-05-12 15:06:47 +00:00
1 parent 69382f912b
commit 42f33d9f13
11 files changed
+76 -42

No files matched your search

+6 -8
View File
@@ -1,7 +1,5 @@
<?php
use Lean\Factory\HttpFactory;
use Ulmus\User\{Entity,
Lib\Authenticate,
Lib\Authorize,
@@ -13,7 +11,7 @@ use Picea\Picea;
use Storage\{ Cookie, Session };
use function DI\{get, autowire, create};
use function DI\{get, create};
return [
Authenticate::class => create(Authenticate::class)->constructor(get(Entity\UserInterface::class), get(Session::class), get(Cookie::class), get('authentication.method')),
@@ -29,17 +27,17 @@ return [
'authentication.method' => null,
'authorize.error' => function($c) {
return function(array $errorData) {
return HttpFactory::createJsonResponse($errorData + [
return function(array $errorData) use ($c) {
return $c->get(\Lean\Factory\HttpFactoryInterface::class)::createJsonResponse($errorData + [
'api.error' => "Authorization failed",
'api.datetime' => (new \DateTime)->format(\DateTime::ISO8601),
'api.datetime' => (new \DateTime)->format(\DateTime::ATOM),
], 403);
};
},
'authentication.error' => function($c, Picea $picea) {
return function($message) use ($picea) {
return HttpFactory::createHtmlResponse($picea->renderHtml('lean/error/500', [
return function($message) use ($picea, $c) {
return $c->get(\Lean\Factory\HttpFactoryInterface::class)::createHtmlResponse($picea->renderHtml('lean/error/500', [
'title' => "Authentication failed",
'subtitle' => "",
'message' => $message,