mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-27 16:26:37 +03:00
54 lines
1.9 KiB
PHP
54 lines
1.9 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Shlinkio\Shlink\Rest;
|
|
|
|
use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
|
|
|
return [
|
|
|
|
'auth' => [
|
|
'routes_whitelist' => [
|
|
Action\AuthenticateAction::class,
|
|
Action\ShortUrl\SingleStepCreateShortUrlAction::class,
|
|
],
|
|
|
|
'plugins' => [
|
|
'factories' => [
|
|
Authentication\Plugin\ApiKeyHeaderPlugin::class => ConfigAbstractFactory::class,
|
|
Authentication\Plugin\AuthorizationHeaderPlugin::class => ConfigAbstractFactory::class,
|
|
],
|
|
'aliases' => [
|
|
Authentication\Plugin\ApiKeyHeaderPlugin::HEADER_NAME =>
|
|
Authentication\Plugin\ApiKeyHeaderPlugin::class,
|
|
Authentication\Plugin\AuthorizationHeaderPlugin::HEADER_NAME =>
|
|
Authentication\Plugin\AuthorizationHeaderPlugin::class,
|
|
],
|
|
],
|
|
],
|
|
|
|
'dependencies' => [
|
|
'factories' => [
|
|
Authentication\AuthenticationPluginManager::class =>
|
|
Authentication\AuthenticationPluginManagerFactory::class,
|
|
Authentication\RequestToHttpAuthPlugin::class => ConfigAbstractFactory::class,
|
|
|
|
Middleware\AuthenticationMiddleware::class => ConfigAbstractFactory::class,
|
|
],
|
|
],
|
|
|
|
ConfigAbstractFactory::class => [
|
|
Authentication\Plugin\AuthorizationHeaderPlugin::class => [Authentication\JWTService::class, 'translator'],
|
|
Authentication\Plugin\ApiKeyHeaderPlugin::class => [Service\ApiKeyService::class, 'translator'],
|
|
|
|
Authentication\RequestToHttpAuthPlugin::class => [Authentication\AuthenticationPluginManager::class],
|
|
|
|
Middleware\AuthenticationMiddleware::class => [
|
|
Authentication\RequestToHttpAuthPlugin::class,
|
|
'translator',
|
|
'config.auth.routes_whitelist',
|
|
'Logger_Shlink',
|
|
],
|
|
],
|
|
|
|
];
|