added a missing check for the provider key
This commit is contained in:
parent
b0e3ea5f5f
commit
5b7e1e6f68
@ -47,7 +47,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles X509 authentication.
|
* Handles pre-authentication.
|
||||||
*
|
*
|
||||||
* @param GetResponseEvent $event A GetResponseEvent instance
|
* @param GetResponseEvent $event A GetResponseEvent instance
|
||||||
*/
|
*/
|
||||||
@ -62,7 +62,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface
|
|||||||
list($user, $credentials) = $this->getPreAuthenticatedData($request);
|
list($user, $credentials) = $this->getPreAuthenticatedData($request);
|
||||||
|
|
||||||
if (null !== $token = $this->securityContext->getToken()) {
|
if (null !== $token = $this->securityContext->getToken()) {
|
||||||
if ($token instanceof PreAuthenticatedToken && $token->isAuthenticated() && $token->getUsername() === $user) {
|
if ($token instanceof PreAuthenticatedToken && $this->providerKey == $token->getProviderKey() && $token->isAuthenticated() && $token->getUsername() === $user) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user