partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 489ef9cf4ac5cd88d45773f48ec8fe52ffa7d271
parent 997774eb857f60d6db5e44889796b8dff2273fed
Author: Felicitus <felicitus@felicitus.org>
Date:   Sat, 31 Oct 2015 14:49:21 +0100

Store the provider class name and not the provider instance, as this causes an issue where it can't be serialized

Diffstat:
Msrc/PartKeepr/AuthBundle/Security/Authentication/AuthenticationProviderManager.php | 2+-
Msrc/PartKeepr/AuthBundle/Services/UserService.php | 3+--
2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/PartKeepr/AuthBundle/Security/Authentication/AuthenticationProviderManager.php b/src/PartKeepr/AuthBundle/Security/Authentication/AuthenticationProviderManager.php @@ -76,7 +76,7 @@ class AuthenticationProviderManager implements AuthenticationManagerInterface $result = $provider->authenticate($token); if (null !== $result) { - $result->setAttribute("provider", $provider); + $result->setAttribute("provider", get_class($provider)); break; } } catch (AccountStatusException $e) { diff --git a/src/PartKeepr/AuthBundle/Services/UserService.php b/src/PartKeepr/AuthBundle/Services/UserService.php @@ -58,9 +58,8 @@ class UserService return $this->getProxyUser($username, $provider); } - public function getProvider(AuthenticationProviderInterface $authenticationProvider) + public function getProvider($providerClass) { - $providerClass = get_class($authenticationProvider); $providerType = $this->getProviderTypeByClass($providerClass); return $this->getProviderByType($providerType);