SecurityFactoryInterface.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory;
  11. use Symfony\Component\Config\Definition\Builder\NodeDefinition;
  12. use Symfony\Component\DependencyInjection\ContainerBuilder;
  13. /**
  14. * SecurityFactoryInterface is the interface for all security authentication listener.
  15. *
  16. * @author Fabien Potencier <fabien@symfony.com>
  17. */
  18. interface SecurityFactoryInterface
  19. {
  20. /**
  21. * Configures the container services required to use the authentication listener.
  22. *
  23. * @param ContainerBuilder $container
  24. * @param string $id The unique id of the firewall
  25. * @param array $config The options array for the listener
  26. * @param string $userProvider The service id of the user provider
  27. * @param string $defaultEntryPoint
  28. *
  29. * @return array containing three values:
  30. * - the provider id
  31. * - the listener id
  32. * - the entry point id
  33. */
  34. public function create(ContainerBuilder $container, $id, $config, $userProvider, $defaultEntryPoint);
  35. /**
  36. * Defines the position at which the provider is called.
  37. * Possible values: pre_auth, form, http, and remember_me.
  38. *
  39. * @return string
  40. */
  41. public function getPosition();
  42. /**
  43. * Defines the configuration key used to reference the provider
  44. * in the firewall configuration.
  45. *
  46. * @return string
  47. */
  48. public function getKey();
  49. public function addConfiguration(NodeDefinition $builder);
  50. }