| Server IP : 65.108.144.40 / Your IP : 216.73.217.165 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 User : dev ( 1000) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/project-slim/app/Routes/ |
Upload File : |
<?php
use App\Controllers\AuthController;
use Slim\App;
return function (App $app) {
// Authentication routes
$app->post('/api/v1/auth/login', [AuthController::class, 'login']);
$app->post('/api/v1/auth/register', [AuthController::class, 'register']);
$app->post('/api/v1/auth/logout', [AuthController::class, 'logout']);
$app->post('/api/v1/auth/refresh', [AuthController::class, 'refresh']);
// Password management
$app->post('/api/v1/auth/forgot-password', [AuthController::class, 'forgotPassword']);
$app->post('/api/v1/auth/reset-password', [AuthController::class, 'resetPassword']);
$app->post('/api/v1/auth/change-password', [AuthController::class, 'changePassword']);
// Email verification
$app->get('/api/v1/auth/verify-email/{token}', [AuthController::class, 'verifyEmail']);
$app->post('/api/v1/auth/resend-verification', [AuthController::class, 'resendVerification']);
// Authentication check
$app->get('/api/v1/auth/check', [AuthController::class, 'check']);
// Two-factor authentication
$app->post('/api/v1/auth/2fa/setup', [AuthController::class, 'setupTwoFactor']);
$app->post('/api/v1/auth/2fa/verify', [AuthController::class, 'verifyTwoFactor']);
// Session management
$app->get('/api/v1/auth/sessions', [AuthController::class, 'getSessions']);
$app->delete('/api/v1/auth/sessions/{session_id}', [AuthController::class, 'revokeSession']);
};