2018-05-01 19:35:12 +03:00
|
|
|
<?php
|
2019-10-05 18:26:10 +03:00
|
|
|
|
2018-05-01 19:35:12 +03:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Shlinkio\Shlink\Rest;
|
|
|
|
|
2020-01-01 23:11:53 +03:00
|
|
|
use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
2018-09-28 23:08:01 +03:00
|
|
|
|
2018-05-01 19:35:12 +03:00
|
|
|
return [
|
|
|
|
|
|
|
|
'auth' => [
|
|
|
|
'routes_whitelist' => [
|
2018-12-23 12:18:38 +03:00
|
|
|
Action\HealthAction::class,
|
2018-09-20 20:55:24 +03:00
|
|
|
Action\ShortUrl\SingleStepCreateShortUrlAction::class,
|
2020-01-07 01:32:43 +03:00
|
|
|
ConfigProvider::UNVERSIONED_HEALTH_ENDPOINT_NAME,
|
2018-05-01 19:35:12 +03:00
|
|
|
],
|
2018-09-28 23:08:01 +03:00
|
|
|
|
|
|
|
'plugins' => [
|
|
|
|
'factories' => [
|
|
|
|
Authentication\Plugin\ApiKeyHeaderPlugin::class => ConfigAbstractFactory::class,
|
|
|
|
],
|
|
|
|
'aliases' => [
|
|
|
|
Authentication\Plugin\ApiKeyHeaderPlugin::HEADER_NAME =>
|
|
|
|
Authentication\Plugin\ApiKeyHeaderPlugin::class,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
'dependencies' => [
|
|
|
|
'factories' => [
|
|
|
|
Authentication\AuthenticationPluginManager::class =>
|
|
|
|
Authentication\AuthenticationPluginManagerFactory::class,
|
2018-09-29 09:16:40 +03:00
|
|
|
Authentication\RequestToHttpAuthPlugin::class => ConfigAbstractFactory::class,
|
2018-09-28 23:08:01 +03:00
|
|
|
|
|
|
|
Middleware\AuthenticationMiddleware::class => ConfigAbstractFactory::class,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
ConfigAbstractFactory::class => [
|
2018-11-18 18:28:04 +03:00
|
|
|
Authentication\Plugin\ApiKeyHeaderPlugin::class => [Service\ApiKeyService::class],
|
2018-09-28 23:08:01 +03:00
|
|
|
|
2018-09-29 09:16:40 +03:00
|
|
|
Authentication\RequestToHttpAuthPlugin::class => [Authentication\AuthenticationPluginManager::class],
|
|
|
|
|
2018-09-28 23:08:01 +03:00
|
|
|
Middleware\AuthenticationMiddleware::class => [
|
2018-09-29 09:16:40 +03:00
|
|
|
Authentication\RequestToHttpAuthPlugin::class,
|
2018-09-28 23:08:01 +03:00
|
|
|
'config.auth.routes_whitelist',
|
|
|
|
],
|
2018-05-01 19:35:12 +03:00
|
|
|
],
|
|
|
|
|
|
|
|
];
|