seacms-auth/SeacmsAuth.php
Jérémy Dufraisse e62284363a feat(auth): create
2023-02-26 02:54:53 +01:00

38 lines
688 B
PHP

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