39 lines
733 B
PHP
39 lines
733 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 registerOnPageRenderedApiRoutes():array
|
|
{
|
|
return [
|
|
'GET login/isConnected' => 'apiIsConnected',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* method for api
|
|
* @return JsonResponse
|
|
*/
|
|
public function apiIsConnected(): JsonResponse
|
|
{
|
|
return new JsonResponse(200,['connected'=>false]);
|
|
}
|
|
}
|