feat: implement JWT-based authentication system with repository, service, and middleware layers
This commit is contained in:
+14
-2
@@ -20,7 +20,7 @@ KrothiumAPI::init(config: [
|
||||
'root' => __DIR__ . '/..',
|
||||
'src' => __DIR__ . '/../app',
|
||||
'module' => __DIR__ . '/../app/Module',
|
||||
'storage' => __DIR__ . '/var/www/workbloomerp-api/storage',
|
||||
'storage' => __DIR__ . '/../storage',
|
||||
'component' => __DIR__ . '/../app/Common/Component',
|
||||
],
|
||||
'router' => [
|
||||
@@ -43,7 +43,19 @@ KrothiumAPI::init(config: [
|
||||
]
|
||||
]);
|
||||
|
||||
// Importa rotas da API v0
|
||||
// ======================================
|
||||
// Registra Middlewares
|
||||
// ======================================
|
||||
use KrothiumAPI\Http\Router;
|
||||
use WorkbloomERP\Middleware\AuthMiddleware;
|
||||
use WorkbloomERP\Module\Auth\Routes as AuthRoutes;
|
||||
|
||||
Router::defineMiddleware('auth', [AuthMiddleware::class, 'handle']);
|
||||
|
||||
// ======================================
|
||||
// Importa rotas dos módulos
|
||||
// ======================================
|
||||
AuthRoutes::register();
|
||||
|
||||
// ============================
|
||||
// Dispara o roteador
|
||||
|
||||
Reference in New Issue
Block a user