<?php

namespace apexl\Io\modules\authentication\controllers;
use apexl\Io\includes\System;

use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;

class authenticationController {

    /**
     * @param Request $request
     * @param Response $response
     * @method GET
     * @return Response
     */
    public function authenticated(Request $request, Response $response){
        //for now, we return the install options so any system interacting with this can make a choice.
        $data = [
            'authenticated' => $request->getAttribute('authenticated', true)
        ];

        return System::asJson($response, $data, 200);
    }

    public function setMethod(Request $request, Response $response){
        //get known authentication methods


        return System::asJson($response, $data, 200);
    }
}