- WIP on ulmus-user mechanics updates
This commit is contained in:
parent
7ee4b2d8bb
commit
9031236930
@ -4,6 +4,7 @@ use Lean\Factory\HttpFactoryInterface;
|
|||||||
|
|
||||||
use Ulmus\User\{Authorize\HeaderAuthentication,
|
use Ulmus\User\{Authorize\HeaderAuthentication,
|
||||||
Entity,
|
Entity,
|
||||||
|
|
||||||
Lib\Authenticate,
|
Lib\Authenticate,
|
||||||
Lib\Authorize,
|
Lib\Authorize,
|
||||||
Middleware\AuthenticationMiddleware,
|
Middleware\AuthenticationMiddleware,
|
||||||
@ -12,12 +13,12 @@ use Ulmus\User\{Authorize\HeaderAuthentication,
|
|||||||
Authorize\PostRequestAuthentication};
|
Authorize\PostRequestAuthentication};
|
||||||
|
|
||||||
use Picea\Picea;
|
use Picea\Picea;
|
||||||
|
|
||||||
use Storage\{ Cookie, Session };
|
use Storage\{ Cookie, Session };
|
||||||
|
|
||||||
use Psr\Container\ContainerInterface;
|
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')),
|
||||||
|
|
||||||
@ -47,6 +48,7 @@ return [
|
|||||||
'authentication.error' => function($c, Picea $picea) {
|
'authentication.error' => function($c, Picea $picea) {
|
||||||
return function($message) use ($c, $picea) {
|
return function($message) use ($c, $picea) {
|
||||||
return $c->get(HttpFactoryInterface::class)::createHtmlResponse($picea->renderHtml('lean/error/500', [
|
return $c->get(HttpFactoryInterface::class)::createHtmlResponse($picea->renderHtml('lean/error/500', [
|
||||||
|
|
||||||
'title' => "Authentication failed",
|
'title' => "Authentication failed",
|
||||||
'subtitle' => "",
|
'subtitle' => "",
|
||||||
'message' => $message,
|
'message' => $message,
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 40 KiB |
Loading…
x
Reference in New Issue
Block a user