@@ -1545,59 +1545,6 @@ Now, all authentication mechanisms will use the ``chain_provider``, since
1545
1545
it's the first specified. The ``chain_provider `` will, in turn, try to load
1546
1546
the user from both the ``in_memory `` and ``user_db `` providers.
1547
1547
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
-
1601
1548
You can also configure the firewall or individual authentication mechanisms
1602
1549
to use a specific provider. Again, unless a provider is specified explicitly,
1603
1550
the first provider is always used:
0 commit comments