diff options
author | Joshua Thijssen <jthijssen@noxlogic.nl> | 2015-01-21 14:17:42 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2015-03-26 13:47:14 +0100 |
commit | a6bb27a476fd41db01c9db5a076afdcbe416e893 (patch) | |
tree | f347fe1975cc6c97a8ca5fc23fb41b8183fb0013 /Core/Authentication | |
parent | 8508d163454c5ed699f01f1ef20f7e2038c0d0a8 (diff) | |
download | symfony-security-a6bb27a476fd41db01c9db5a076afdcbe416e893.zip symfony-security-a6bb27a476fd41db01c9db5a076afdcbe416e893.tar.gz symfony-security-a6bb27a476fd41db01c9db5a076afdcbe416e893.tar.bz2 |
Implemented check on interface implementation
Diffstat (limited to 'Core/Authentication')
-rw-r--r-- | Core/Authentication/AuthenticationProviderManager.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Core/Authentication/AuthenticationProviderManager.php b/Core/Authentication/AuthenticationProviderManager.php index f713e8f..16de8da 100644 --- a/Core/Authentication/AuthenticationProviderManager.php +++ b/Core/Authentication/AuthenticationProviderManager.php @@ -48,6 +48,12 @@ class AuthenticationProviderManager implements AuthenticationManagerInterface throw new \InvalidArgumentException('You must at least add one authentication provider.'); } + foreach ($providers as $provider) { + if (!$provider instanceof AuthenticationProviderInterface) { + throw new \InvalidArgumentException(sprintf('Provider "%s" must implement the AuthenticationProviderInterface.', get_class($provider))); + } + } + $this->providers = $providers; $this->eraseCredentials = (bool) $eraseCredentials; } |