shlink/module/Rest/config/auth.config.php

50 lines
1.5 KiB
PHP
Raw Normal View History

<?php
2019-10-05 18:26:10 +03:00
declare(strict_types=1);
namespace Shlinkio\Shlink\Rest;
2020-01-01 23:11:53 +03:00
use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
return [
'auth' => [
'routes_whitelist' => [
2018-12-23 12:18:38 +03:00
Action\HealthAction::class,
Action\ShortUrl\SingleStepCreateShortUrlAction::class,
],
'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,
Authentication\RequestToHttpAuthPlugin::class => ConfigAbstractFactory::class,
Middleware\AuthenticationMiddleware::class => ConfigAbstractFactory::class,
],
],
ConfigAbstractFactory::class => [
2018-11-18 18:28:04 +03:00
Authentication\Plugin\ApiKeyHeaderPlugin::class => [Service\ApiKeyService::class],
Authentication\RequestToHttpAuthPlugin::class => [Authentication\AuthenticationPluginManager::class],
Middleware\AuthenticationMiddleware::class => [
Authentication\RequestToHttpAuthPlugin::class,
'config.auth.routes_whitelist',
],
],
];