2024-08-29 16:09:38 +01:00

20 lines
331 B
PHP

<?php
require "vendor/autoload.php";
use Dumbo\Dumbo;
use Dumbo\Helpers\BearerAuth;
$app = new Dumbo();
$token = "mysupersecret";
$app->use(BearerAuth::bearerAuth($token));
$app->get("/", function ($context) {
return $context->json([
"message" => "Protected route accessed successfully",
]);
});
$app->run();