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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lib
unicaen
auth
Commits
2d8dc9b8
Commit
2d8dc9b8
authored
Jul 4, 2013
by
Bertrand Gauthier
Browse files
Options
Downloads
Patches
Plain Diff
Suppression services jamais utilisés.
parent
0ba8e633
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/UnicaenAuth/Authentication/Service/StrategyService.php
+0
-121
0 additions, 121 deletions
src/UnicaenAuth/Authentication/Service/StrategyService.php
src/UnicaenAuth/Authentication/Service/StrategyServiceFactory.php
+0
-25
0 additions, 25 deletions
...aenAuth/Authentication/Service/StrategyServiceFactory.php
with
0 additions
and
146 deletions
src/UnicaenAuth/Authentication/Service/StrategyService.php
deleted
100644 → 0
+
0
−
121
View file @
0ba8e633
<?php
namespace
UnicaenAuth\Authentication\Service
;
use
UnicaenAuth\Authentication\Strategy\StrategyInterface
;
use
Zend\EventManager\EventManager
;
use
Zend\EventManager\EventManagerAwareInterface
;
use
Zend\EventManager\EventManagerInterface
;
use
Zend\ServiceManager\ServiceManager
;
use
Zend\ServiceManager\ServiceManagerAwareInterface
;
use
ZfcUser\Authentication\Adapter\AbstractAdapter
;
use
ZfcUser\Authentication\Adapter\AdapterChainEvent
;
/**
*
*
* @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>
*/
class
StrategyService
extends
AbstractAdapter
implements
ServiceManagerAwareInterface
,
EventManagerAwareInterface
{
/**
* @var StrategyInterface
*/
protected
$strategy
;
/**
* @var ServiceManager
*/
protected
$serviceManager
;
/**
* @var EventManager
*/
protected
$eventManager
;
/**
*
* @param StrategyInterface $strategy
*/
public
function
__construct
(
StrategyInterface
$strategy
=
null
)
{
$this
->
setStrategy
(
$strategy
);
}
/**
*
* @param AdapterChainEvent $e
* @return boolean
*/
public
function
authenticate
(
AdapterChainEvent
$e
)
{
$casAdapter
->
getEventManager
()
->
attach
(
'userAuthenticated'
,
array
(
$userService
,
'userAuthenticated'
),
1
);
$this
->
getStrategy
()
->
authenticate
(
$e
);
die
(
__METHOD__
);
}
/**
*
*
* @return StrategyInterface
*/
public
function
getStrategy
()
{
return
$this
->
strategy
;
}
/**
*
*
* @param StrategyInterface $strategy
* @return StrategyService
*/
public
function
setStrategy
(
StrategyInterface
$strategy
)
{
$this
->
strategy
=
$strategy
;
return
$this
;
}
/**
* Retrieve service manager instance
*
* @return ServiceManager
*/
public
function
getServiceManager
()
{
return
$this
->
serviceManager
;
}
/**
* Set service manager
*
* @param ServiceManager $serviceManager
* @return StrategyService
*/
public
function
setServiceManager
(
ServiceManager
$serviceManager
)
{
$this
->
serviceManager
=
$serviceManager
;
return
$this
;
}
/**
* Retrieve EventManager instance
*
* @return EventManagerInterface
*/
public
function
getEventManager
()
{
return
$this
->
eventManager
;
}
/**
* Inject an EventManager instance
*
* @param EventManagerInterface $eventManager
* @return StrategyService
*/
public
function
setEventManager
(
EventManagerInterface
$eventManager
)
{
$this
->
eventManager
=
$eventManager
;
return
$this
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/UnicaenAuth/Authentication/Service/StrategyServiceFactory.php
deleted
100644 → 0
+
0
−
25
View file @
0ba8e633
<?php
namespace
UnicaenAuth\Authentication\Service
;
use
Zend\ServiceManager\FactoryInterface
;
use
Zend\ServiceManager\ServiceLocatorInterface
;
/**
*
*
* @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>
*/
class
StrategyServiceFactory
implements
FactoryInterface
{
/**
* Create service
*
* @param ServiceLocatorInterface $serviceLocator
* @return mixed
*/
public
function
createService
(
ServiceLocatorInterface
$serviceLocator
)
{
$strategy
=
$serviceLocator
->
get
(
'UnicaenAuth\Authentication\Strategy\Strategy'
);
return
new
StrategyService
(
$strategy
);
}
}
\ No newline at end of file
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