feat: add MCP server for the website chatbot over a mirrored TYPO3 content feed

This commit is contained in:
fromme committed 2026-10-08 11:46:58 +02:00
1 parent ff7ddf7a9e
commit 1b4384e3f3
52 files changed
+5117 -4

No files matched your search

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace App\Tests\Security;
use App\Security\McpAccessTokenHandler;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
class McpAccessTokenHandlerTest extends TestCase
{
public function testTheConfiguredTokenAuthenticatesTheN8nUser(): void
{
self::assertSame(McpAccessTokenHandler::USER, (new McpAccessTokenHandler('s3cret'))->getUserBadgeFrom('s3cret')->getUserIdentifier());
}
public function testAWrongTokenIsRejected(): void
{
$this->expectException(BadCredentialsException::class);
(new McpAccessTokenHandler('s3cret'))->getUserBadgeFrom('guess');
}
public function testAnUnconfiguredTokenRejectsEverything(): void
{
$this->expectException(BadCredentialsException::class);
(new McpAccessTokenHandler(''))->getUserBadgeFrom('');
}
}