<?php
// File: app/Middleware/AuthMiddleware.php

namespace Core\Middleware;

use Core\Auth;
use Core\Response;

class AuthMiddleware implements MiddlewareInterface
{
    public function handle(string $uri, string $method, array $params): bool
    {
        if (!Auth::check()) {
            Response::redirect('/login');
            return false;
        }

        return true;
    }
}