Skip to content

Commit 11ed10e

Browse files
committed
Merge branch '2.1' into 2.2
Conflicts: book/security.rst
2 parents 8100b79 + 4d04fd1 commit 11ed10e

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

book/security.rst

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,59 +1545,6 @@ Now, all authentication mechanisms will use the ``chain_provider``, since
15451545
it's the first specified. The ``chain_provider`` will, in turn, try to load
15461546
the user from both the ``in_memory`` and ``user_db`` providers.
15471547

1548-
.. tip::
1549-
1550-
If you have no reasons to separate your ``in_memory`` users from your
1551-
``user_db`` users, you can accomplish this even more easily by combining
1552-
the two sources into a single provider:
1553-
1554-
.. configuration-block::
1555-
1556-
.. code-block:: yaml
1557-
1558-
# app/config/security.yml
1559-
security:
1560-
providers:
1561-
main_provider:
1562-
memory:
1563-
users:
1564-
foo: { password: test }
1565-
entity:
1566-
class: Acme\UserBundle\Entity\User,
1567-
property: username
1568-
1569-
.. code-block:: xml
1570-
1571-
<!-- app/config/security.xml -->
1572-
<config>
1573-
<provider name=="main_provider">
1574-
<memory>
1575-
<user name="foo" password="test" />
1576-
</memory>
1577-
1578-
<entity class="Acme\UserBundle\Entity\User"
1579-
property="username" />
1580-
</provider>
1581-
</config>
1582-
1583-
.. code-block:: php
1584-
1585-
// app/config/security.php
1586-
$container->loadFromExtension('security', array(
1587-
'providers' => array(
1588-
'main_provider' => array(
1589-
'memory' => array(
1590-
'users' => array(
1591-
'foo' => array('password' => 'test'),
1592-
),
1593-
),
1594-
'entity' => array(
1595-
'class' => 'Acme\UserBundle\Entity\User',
1596-
'property' => 'username'),
1597-
),
1598-
),
1599-
));
1600-
16011548
You can also configure the firewall or individual authentication mechanisms
16021549
to use a specific provider. Again, unless a provider is specified explicitly,
16031550
the first provider is always used:

0 commit comments

Comments
 (0)