Skip to content

Instantly share code, notes, and snippets.

@caefer
Created March 14, 2011 13:37
Show Gist options
  • Select an option

  • Save caefer/869120 to your computer and use it in GitHub Desktop.

Select an option

Save caefer/869120 to your computer and use it in GitHub Desktop.
<?php
// ...
protected function getSecurity_Authentication_ManagerService()
{
$a = $this->get('fos_facebook.api');
return $this->services['security.authentication.manager'] = new \Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager(array(
0 => new \FOS\FacebookBundle\Security\Authentication\Provider\FacebookProvider($a, $this->get('fos_facebook.user_provider'), new \Symfony\Component\Security\Core\User\UserChecker()),
1 => new \Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider('SomeRandomValue'),
2 => new \FOS\FacebookBundle\Security\Authentication\Provider\FacebookProvider($a)
));
}
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment