Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
auth
Commits
12a32560
Commit
12a32560
authored
Mar 14, 2019
by
Bertrand Gauthier
Browse files
Corrections nécessaires pour monter à zf-commons/zfc-user ^3.0
parent
fa319b5a
Pipeline
#4007
passed with stage
in 21 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/UnicaenAuth/Authentication/Adapter/Cas.php
View file @
12a32560
...
...
@@ -14,7 +14,7 @@ use Zend\EventManager\EventManagerAwareInterface;
use
Zend\EventManager\EventManagerInterface
;
use
Zend\Router\Http\TreeRouteStack
;
use
ZfcUser\Authentication\Adapter\AbstractAdapter
;
use
ZfcUser\Authentication\Adapter\AdapterChainEvent
as
AuthEvent
;
use
ZfcUser\Authentication\Adapter\AdapterChainEvent
;
use
ZfcUser\Authentication\Adapter\ChainableAdapter
;
/**
...
...
@@ -78,14 +78,12 @@ class Cas extends AbstractAdapter implements EventManagerAwareInterface
/**
* Réalise l'authentification.
*
* @param Event $e
* @param
AdapterChain
Event $e
* @throws UnexpectedValueException
* @see ChainableAdapter
*/
public
function
authenticate
(
Event
$e
)
public
function
authenticate
(
AdapterChain
Event
$e
)
{
$e
=
$e
->
getTarget
();
// if ($e->getIdentity()) {
// return;
// }
...
...
src/UnicaenAuth/Authentication/Adapter/Db.php
View file @
12a32560
...
...
@@ -7,8 +7,7 @@ use UnicaenApp\ServiceManager\ServiceLocatorAwareInterface;
use
UnicaenApp\ServiceManager\ServiceLocatorAwareTrait
;
use
UnicaenAuth\Options\ModuleOptions
;
use
Zend\ServiceManager\Exception\ServiceNotFoundException
;
use
ZfcUser\Authentication\Adapter\AdapterChainEvent
as
AuthEvent
;
use
ZfcUser\Options\AuthenticationOptionsInterface
;
use
ZfcUser\Authentication\Adapter\AdapterChainEvent
;
/**
* Adpater d'authentification à partir de la base de données.
...
...
@@ -40,13 +39,13 @@ class Db extends \ZfcUser\Authentication\Adapter\Db implements ServiceLocatorAwa
/**
* Authentification.
*
* @param A
uthEvent|\Zend\EventManager\
Event $e
* @param A
dapterChain
Event $e
* @return boolean
*/
public
function
authenticate
(
\
Zend\EventManager\
Event
$e
)
public
function
authenticate
(
AdapterChain
Event
$e
)
{
if
(
$e
->
getTarget
()
->
getIdentity
())
{
return
;
if
(
$e
->
getIdentity
())
{
return
true
;
}
try
{
...
...
@@ -60,10 +59,10 @@ class Db extends \ZfcUser\Authentication\Adapter\Db implements ServiceLocatorAwa
}
/**
* @param
AuthenticationOptionsInterface
$options
* @param
\ZfcUser\Options\ModuleOptions
$options
* @return self
*/
public
function
setOptions
(
AuthenticationOptionsInterface
$options
)
public
function
setOptions
(
\
ZfcUser\Options\ModuleOptions
$options
)
{
$this
->
options
=
$options
;
return
$this
;
...
...
src/UnicaenAuth/Authentication/Adapter/Ldap.php
View file @
12a32560
...
...
@@ -14,6 +14,7 @@ use Zend\EventManager\EventManager;
use
Zend\EventManager\EventManagerAwareInterface
;
use
Zend\EventManager\EventManagerInterface
;
use
ZfcUser\Authentication\Adapter\AbstractAdapter
;
use
ZfcUser\Authentication\Adapter\AdapterChainEvent
;
use
ZfcUser\Authentication\Adapter\ChainableAdapter
;
/**
...
...
@@ -78,16 +79,14 @@ class Ldap extends AbstractAdapter implements EventManagerAwareInterface
/**
*
* @param Event $e
* @param
AdapterChain
Event $e
* @return boolean
* @throws \Zend\Authentication\Adapter\Exception\ExceptionInterface
* @throws \Zend\Ldap\Exception\LdapException
* @see ChainableAdapter
*/
public
function
authenticate
(
Event
$e
)
public
function
authenticate
(
AdapterChain
Event
$e
)
{
$e
=
$e
->
getTarget
();
if
(
$this
->
isSatisfied
())
{
try
{
$storage
=
$this
->
getStorage
()
->
read
();
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment