From f5d2a669b33f64040d08d07085149b22f32b77ca Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Tue, 10 Dec 2013 16:41:00 +0100 Subject: [PATCH] Remove invalid tip for multiple providers As confirmed by stof in #9734, the tip has never worked and is not going to work --- book/security.rst | 49 ----------------------------------------------- 1 file changed, 49 deletions(-) diff --git a/book/security.rst b/book/security.rst index 09036d7562d..31ffc53300f 100644 --- a/book/security.rst +++ b/book/security.rst @@ -1469,55 +1469,6 @@ Now, all authentication mechanisms will use the ``chain_provider``, since it's the first specified. The ``chain_provider`` will, in turn, try to load the user from both the ``in_memory`` and ``user_db`` providers. -.. tip:: - - If you have no reasons to separate your ``in_memory`` users from your - ``user_db`` users, you can accomplish this even more easily by combining - the two sources into a single provider: - - .. configuration-block:: - - .. code-block:: yaml - - # app/config/security.yml - security: - providers: - main_provider: - memory: - users: - foo: { password: test } - entity: - class: Acme\UserBundle\Entity\User, - property: username - - .. code-block:: xml - - - - - - - - - - - - .. code-block:: php - - // app/config/security.php - $container->loadFromExtension('security', array( - 'providers' => array( - 'main_provider' => array( - 'memory' => array( - 'users' => array( - 'foo' => array('password' => 'test'), - ), - ), - 'entity' => array('class' => 'Acme\UserBundle\Entity\User', 'property' => 'username'), - ), - ), - )); - You can also configure the firewall or individual authentication mechanisms to use a specific provider. Again, unless a provider is specified explicitly, the first provider is always used: