seacms-auth/SeacmsAuth.php
2023-02-28 01:59:38 +01:00

39 lines
719 B
PHP

<?php
// SPDX-License-Identifier: EUPL-1.2
// Authors: see README.md
use SeaCMS\Api\ApiAware;
use SeaCMS\Api\JsonResponse;
/**
* authentification plugin for Pico 3.
*/
class SeacmsAuth extends AbstractPicoPlugin implements ApiAware
{
/**
* Pico API version.
* @var int
*/
const API_VERSION = 3;
/**
* return api routes
* @return array
*/
public function registerApiRoutes():array
{
return [
'GET login/isConnected' => 'apiIsConnected',
];
}
/**
* method for api
* @return JsonResponse
*/
public function apiIsConnected(): JsonResponse
{
return new JsonResponse(200,['connected'=>false]);
}
}