- Repaired a bad authentiation config
This commit is contained in:
parent
2378245dbf
commit
2a18e0cb9a
|
@ -30,7 +30,7 @@ return [
|
|||
return HttpFactory::createJsonResponse($errorData + [
|
||||
'api.error' => "Authorization failed",
|
||||
'api.datetime' => (new \DateTime)->format(\DateTime::ATOM),
|
||||
]);
|
||||
], 401);
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -40,7 +40,7 @@ return [
|
|||
'title' => "Authentication failed",
|
||||
'subtitle' => "",
|
||||
'message' => $message,
|
||||
]));
|
||||
]), 401);
|
||||
};
|
||||
},
|
||||
];
|
|
@ -50,8 +50,8 @@ return [
|
|||
],
|
||||
|
||||
'app.middlewares' => [
|
||||
HeaderAuthenticationMiddleware::class,
|
||||
PostRequestAuthenticationMiddleware::class,
|
||||
# HeaderAuthenticationMiddleware::class,
|
||||
# PostRequestAuthenticationMiddleware::class,
|
||||
],
|
||||
|
||||
'routes.list' => function($c) {
|
||||
|
|
|
@ -33,7 +33,7 @@ class HttpFactory
|
|||
return new EmptyResponse($code, $headers);
|
||||
}
|
||||
|
||||
public static function createPdfResponse(\Stringable $binary, int $code = 200, array $headers = []) : ResponseInterface
|
||||
public static function createPdfResponse(\Stringable|string $binary, int $code = 200, array $headers = []) : ResponseInterface
|
||||
{
|
||||
return new PdfResponse((string) $binary, $code, $headers);
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ class Lean
|
|||
{
|
||||
$path = dirname(__DIR__) . "/meta/definitions/";
|
||||
|
||||
return array_replace(
|
||||
return array_merge(
|
||||
require($path . "authorize.php"),
|
||||
class_exists(\Mcnd\CLI\CliMiddleware::class) ? require($path . "cli.php") : [],
|
||||
class_exists(\Cronard\CronardMiddleware::class) ? require($path . "cronard.php") : [],
|
||||
|
|
Loading…
Reference in New Issue