Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
/**
* Copyright (C) 2019 Leipzig University Library
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* @author Sebastian Kehr <kehr@ub.uni-leipzig.de>
* @license http://opensource.org/licenses/gpl-2.0.php GNU GPLv2
*/
use fid\Controller\UserController;
use fid\Controller\UserControllerFactory;
use fid\Helper\RegistrationFormLabel;
use fid\Helper\TranslatorDelegator;
use fid\Listener\ErrorListener;
use fid\Listener\ErrorListenerFactory;
use fid\Listener\LocaleListener;
use fid\Service\Client;
use fid\Service\ClientFactory;
use fid\VuFind\Auth\Authenticator;
use fid\VuFind\Auth\AuthenticatorFactory;
use fid\VuFind\Auth\ILSAuthenticator;
use fid\VuFind\Auth\ILSAuthenticatorFactory;
use fid\VuFind\Db\Row\User;
use fid\VuFind\Db\Row\UserDelegatorFactory;
use fid\VuFind\ILS\Fid;
use fid\VuFind\ILS\FidFactory;
use VuFind\Auth\ILSAuthenticator as BaseILSAuthenticator;
use VuFind\Db\Row\User as BaseUser;
use VuFind\Db\Row\UserFactory;
use Zend\Mvc\I18n\Translator;
use Zend\ServiceManager\Factory\InvokableFactory;
return [
'controllers' => [
'factories' => [
UserController::class => UserControllerFactory::class,
]
],
'listeners' => [
ErrorListener::class,
LocaleListener::class,
],
'view_helpers' => array(
'invokables' => array(
'formLabel' => RegistrationFormLabel::class,
),
),
'service_manager' => [
'aliases' => [
BaseILSAuthenticator::class => ILSAuthenticator::class,
'MvcTranslator' => Translator::class,
],
'delegators' => [
ILSAuthenticator::class => [
ILSAuthenticatorFactory::class,
],
Translator::class => [
TranslatorDelegator::class,
],
],
'factories' => [
Client::class => ClientFactory::class,
ErrorListener::class => ErrorListenerFactory:: class,
ILSAuthenticator::class => ILSAuthenticatorFactory::class,
LocaleListener::class => InvokableFactory::class,
],
],
'vufind' => [
'plugin_managers' => [
'auth' => [
'aliases' => [
'fid' => Authenticator::class,
],
'factories' => [
Authenticator::class => AuthenticatorFactory::class,
],
],
'db_row' => [
'aliases' => [
BaseUser::class => User::class,
],
'delegators' => [
User::class => [
UserDelegatorFactory::class,
],
],
'factories' => [
User::class => UserFactory::class,
],
],
'ils_driver' => [
'aliases' => [
'fid' => Fid::class,
],
'factories' => [
Fid::class => FidFactory::class,
],
],
],
],
'router' => [
'routes' => [
'fid' => [
'type' => 'literal',
'may_terminate' => false,
'options' => [
'route' => '/fid',
],
'child_routes' => [
'user' => [
'may_terminate' => false,
'type' => 'literal',
'options' => [
'route' => '/user',
],
'child_routes' => [
'may_terminate' => true,
'type' => 'literal',
'options' => [
'route' => '/init',
'defaults' => [
'controller' => UserController::class,
'action' => 'init',
],
],
],
'type' => 'literal',
'options' => [
'route' => '/create',
'defaults' => [
'controller' => UserController::class,
'action' => 'create',
],
],
],
'type' => 'literal',
'options' => [
'route' => '/update',
'defaults' => [
'controller' => UserController::class,
'action' => 'update',
],
],
],
'type' => 'literal',
'options' => [
'route' => '/policy',
'defaults' => [
'controller' => UserController::class,
'action' => 'policy',
],
],
],
'type' => 'literal',
'options' => [
'route' => '/terms',
'defaults' => [
'controller' => UserController::class,
'action' => 'terms',
],
],
],
'reset-password' => [
'type' => 'literal',
'options' => [
'route' => '/reset-password',
'defaults' => [
'controller' => UserController::class,
'action' => 'resetPassword',
],
],
],
'change-password' => [
'type' => 'literal',
'options' => [
'route' => '/change-password',
'defaults' => [
'controller' => UserController::class,
'action' => 'changePassword',
],
],
]
],
],
],
],
'myresearch-account' => [
'options' => [
'defaults' => [
'controller' => UserController::class,
'action' => 'init',
],
],
],
'myresearch-recover' => [
'options' => [
'defaults' => [
'controller' => UserController::class,
'action' => 'resetPassword',
]
]
]