*/ class AuthenticationIdentityProviderServiceFactory implements FactoryInterface { /** * {@inheritDoc} */ public function createService(ServiceLocatorInterface $serviceLocator) { $user = $serviceLocator->get('zfcuser_user_service'); $simpleIdentityProvider = new AuthenticationIdentityProvider($user->getAuthService()); $config = $serviceLocator->get('BjyAuthorize\Config'); $simpleIdentityProvider->setDefaultRole($config['default_role']); $simpleIdentityProvider->setAuthenticatedRole($config['authenticated_role']); return $simpleIdentityProvider; } }