Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
auth
Commits
e9c1b964
Commit
e9c1b964
authored
Feb 27, 2014
by
Bertrand Gauthier
Browse files
Ajout test si le login usurpé existe bien dans l'annuaire.
parent
3a7aa2c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/UnicaenAuth/Authentication/Adapter/Ldap.php
View file @
e9c1b964
...
...
@@ -84,6 +84,13 @@ class Ldap extends AbstractAdapter implements ServiceManagerAwareInterface, Even
$result
=
$this
->
getLdapAuthAdapter
()
->
setUsername
(
$username
)
->
setPassword
(
$credential
)
->
authenticate
();
$failure
=
!
$result
->
isValid
();
// verif existence du login usurpé
if
(
$usernameUsurpe
)
{
if
(
!
$this
->
getLdapAuthAdapter
()
->
getLdap
()
->
searchEntries
(
"(supannAliasLogin=
$usernameUsurpe
)"
))
{
$usernameUsurpe
=
null
;
}
}
// Failure!
if
(
$failure
)
{
$e
->
setCode
(
AuthenticationResult
::
FAILURE
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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