1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-15 09:34:14 +02:00

feat(core): decouple AuthMiddleware from core. #406

AuthMiddleware moved from Flextype core to Admin Panel plugin and renamed to AdminPanelAuthMiddleware
This commit is contained in:
Awilum
2020-03-08 18:37:21 +03:00
parent bebd31dce8
commit b6b7f3bffd
3 changed files with 4 additions and 3 deletions

View File

@@ -28,7 +28,8 @@
"autoload": {
"classmap": [
"app",
"twig"
"twig",
"middlewares"
]
}
}

View File

@@ -16,7 +16,7 @@ use Psr\Http\Message\ServerRequestInterface as Request;
/**
* @property Router $router
*/
class AuthMiddleware extends Middleware
class AdminPanelAuthMiddleware extends Middleware
{
/**
* __invoke

View File

@@ -123,4 +123,4 @@ $app->group('/' . $admin_route, function () use ($app) : void {
$app->post('/api/delivery/registry/edit', 'ApiDeliveryRegistryController:editProcess')->setName('admin.api_delivery_registry.editProcess');
$app->post('/api/delivery/registry/delete', 'ApiDeliveryRegistryController:deleteProcess')->setName('admin.api_delivery_registry.deleteProcess');
})->add(new AuthMiddleware($flextype));
})->add(new AdminPanelAuthMiddleware($flextype));