Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lib
unicaen
auth
Commits
7ffe2396
Commit
7ffe2396
authored
7 years ago
by
Bertrand Gauthier
Browse files
Options
Downloads
Plain Diff
Merge branch 'usurpation'
parents
32ed5e04
84a4f297
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/UnicaenAuth/Authentication/Storage/ChainServiceFactory.php
+9
-2
9 additions, 2 deletions
...nicaenAuth/Authentication/Storage/ChainServiceFactory.php
with
9 additions
and
2 deletions
src/UnicaenAuth/Authentication/Storage/ChainServiceFactory.php
+
9
−
2
View file @
7ffe2396
...
...
@@ -12,11 +12,15 @@ use Zend\ServiceManager\ServiceLocatorInterface;
*/
class
ChainServiceFactory
implements
FactoryInterface
{
pr
otec
te
d
$
s
torages
=
[
pr
iva
te
$
mandatoryS
torages
=
[
200
=>
'UnicaenAuth\Authentication\Storage\Ldap'
,
100
=>
'UnicaenAuth\Authentication\Storage\Db'
,
76
=>
'UnicaenAuth\Authentication\Storage\ShibSimulatorStorage'
,
75
=>
'UnicaenAuth\Authentication\Storage\Shib'
,
];
protected
$storages
=
[];
/**
* Create service
*
...
...
@@ -27,7 +31,10 @@ class ChainServiceFactory implements FactoryInterface
{
$chain
=
new
Chain
();
foreach
(
$this
->
storages
as
$priority
=>
$name
)
{
$storages
=
$this
->
mandatoryStorages
+
$this
->
storages
;
krsort
(
$storages
);
foreach
(
$storages
as
$priority
=>
$name
)
{
$storage
=
$serviceLocator
->
get
(
$name
);
$chain
->
getEventManager
()
->
attach
(
'read'
,
[
$storage
,
'read'
],
$priority
);
$chain
->
getEventManager
()
->
attach
(
'write'
,
[
$storage
,
'write'
],
$priority
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment