- Fixed conflicts
This commit is contained in:
1 parent
adfd619c5f
commit
abe94e498f
3 files changed
+45
-17
No files matched your search
@@ -2,12 +2,14 @@
|
||||
|
||||
use Lean\Factory\HttpFactoryInterface;
|
||||
|
||||
use Ulmus\User\{
|
||||
Authorize\HeaderAuthentication, Authorize\PostRequestAuthentication,
|
||||
use Ulmus\User\{Authorize\HeaderAuthentication,
|
||||
Entity,
|
||||
Lib\Authenticate, Lib\Authorize,
|
||||
Middleware\AuthenticationMiddleware, Middleware\HeaderAuthenticationMiddleware, Middleware\PostRequestAuthenticationMiddleware,
|
||||
};
|
||||
Lib\Authenticate,
|
||||
Lib\Authorize,
|
||||
Middleware\AuthenticationMiddleware,
|
||||
Middleware\HeaderAuthenticationMiddleware,
|
||||
Middleware\PostRequestAuthenticationMiddleware,
|
||||
Authorize\PostRequestAuthentication};
|
||||
|
||||
use Picea\Picea;
|
||||
use Storage\{ Cookie, Session };
|
||||
@@ -15,6 +17,7 @@ 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')),
|
||||
|
||||
@@ -35,9 +38,9 @@ return [
|
||||
'authorize.error' => function(ContainerInterface $c) {
|
||||
return function(array $errorData) use ($c) {
|
||||
return $c->get(HttpFactoryInterface::class)::createJsonResponse($errorData + [
|
||||
'api.error' => "Authorization failed",
|
||||
'api.datetime' => (new \DateTime)->format(\DateTime::ATOM),
|
||||
], 403);
|
||||
'api.error' => "Authorization failed",
|
||||
'api.datetime' => (new \DateTime)->format(\DateTime::ATOM),
|
||||
], 403);
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user