diff --git a/meta/definitions/authorize.php b/meta/definitions/authorize.php index 816f073..cb2a1df 100644 --- a/meta/definitions/authorize.php +++ b/meta/definitions/authorize.php @@ -4,6 +4,7 @@ use Lean\Factory\HttpFactory; use Ulmus\User\{Entity, Lib\Authenticate, + Lib\Authorize, Middleware\HeaderAuthenticationMiddleware, Middleware\PostRequestAuthenticationMiddleware, Authorize\PostRequestAuthentication}; @@ -17,9 +18,11 @@ use function DI\{get, autowire, create}; return [ Authenticate::class => create(Authenticate::class)->constructor(get(Entity\UserInterface::class), get(Session::class), get(Cookie::class), get('authentication.method')), - HeaderAuthenticationMiddleware::class => create(HeaderAuthenticationMiddleware::class)->constructor(get(Entity\UserInterface::class), get('authorize.error')), + Authorize::class => create(Authorize::class)->constructor(get(Entity\UserInterface::class), get(Session::class), get(Cookie::class), get('authentication.method')), - PostRequestAuthentication::class => create(PostRequestAuthentication::class)->constructor(get(\Ulmus\User\Lib\Authenticate::class), "email", "email", "password"), + HeaderAuthenticationMiddleware::class => create(HeaderAuthenticationMiddleware::class)->constructor(get(Authorize::class), get(Entity\UserInterface::class), get('authorize.error')), + + PostRequestAuthentication::class => create(PostRequestAuthentication::class)->constructor(get(Authenticate::class), "email", "email", "password"), PostRequestAuthenticationMiddleware::class => create(PostRequestAuthenticationMiddleware::class)->constructor(get(Entity\UserInterface::class), get('authentication.error'), get(PostRequestAuthentication::class)),