2018-05-01 18:35:12 +02:00
|
|
|
<?php
|
2019-10-05 17:26:10 +02:00
|
|
|
|
2018-05-01 18:35:12 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Shlinkio\Shlink\Rest;
|
|
|
|
|
2020-01-01 21:11:53 +01:00
|
|
|
use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
2018-09-28 22:08:01 +02:00
|
|
|
|
2018-05-01 18:35:12 +02:00
|
|
|
return [
|
|
|
|
|
|
|
|
'auth' => [
|
2021-02-16 15:28:03 +01:00
|
|
|
'routes_without_api_key' => [
|
2018-12-23 10:18:38 +01:00
|
|
|
Action\HealthAction::class,
|
2020-01-06 23:32:43 +01:00
|
|
|
ConfigProvider::UNVERSIONED_HEALTH_ENDPOINT_NAME,
|
2018-05-01 18:35:12 +02:00
|
|
|
],
|
2021-01-21 19:26:19 +01:00
|
|
|
|
|
|
|
'routes_with_query_api_key' => [
|
|
|
|
Action\ShortUrl\SingleStepCreateShortUrlAction::class,
|
|
|
|
],
|
2018-09-28 22:08:01 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
'dependencies' => [
|
|
|
|
'factories' => [
|
|
|
|
Middleware\AuthenticationMiddleware::class => ConfigAbstractFactory::class,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
ConfigAbstractFactory::class => [
|
2021-01-21 19:26:19 +01:00
|
|
|
Middleware\AuthenticationMiddleware::class => [
|
|
|
|
Service\ApiKeyService::class,
|
2021-02-16 15:28:03 +01:00
|
|
|
'config.auth.routes_without_api_key',
|
2021-01-21 19:26:19 +01:00
|
|
|
'config.auth.routes_with_query_api_key',
|
|
|
|
],
|
2018-05-01 18:35:12 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
];
|