<?php
// hello.php
// Copyright P.Kassel, M.Seliger, G.Trietsch, all Rights Reserved
namespace Docuform\Api\Server;use Docuform\Api\HttpRequestHandler;use Psr\Http\Message\ServerRequestInterface;use Psr\Http\Message\ResponseInterface;class hello extends HttpRequestHandler{public function getAllowedUserTypes($request):array{return[];}public function getRequiredScopes($request):array{return['allOf'=>[],'anyOf'=>[]];}public function handleRequest($request,& $response,$arguments):int{$pbody=$request->getParsedBody();$aresponse=array();$tokenData=$request->getAttribute('token_data');$aresponse['sub']=$tokenData['sub']?? '';$aresponse['text']=$pbody['text']?? '';$this->getLogger()->debug('Hello: '.$aresponse['text']);$payload=json_encode($aresponse,JSON_UNESCAPED_SLASHES);$response->getBody()->write($payload);return 200;}}