<?php

declare(strict_types=1);

namespace apexl\Io\modules\authentication\controllers;

use apexl\Io\includes\System;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;

class authenticationController
{
    public function authenticated(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface
    {
        return System::asJson($response, [
            'authenticated' => $request->getAttribute('authenticated', true),
        ]);
    }
}
