You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
seacms-auth/SeacmsAuth.php

38 lines
733 B

<?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]);
}
}