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