Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4d04fd1

Browse files
committed
Merge pull requestsymfony#3309 from Danez/2.1
Remove invalid tip for multiple providers
2 parentsed0f3fd +f5d2a66 commit4d04fd1

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

‎book/security.rst

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,55 +1469,6 @@ Now, all authentication mechanisms will use the ``chain_provider``, since
14691469
it's the first specified. The ``chain_provider`` will, in turn, try to load
14701470
the user from both the ``in_memory`` and ``user_db`` providers.
14711471

1472-
..tip::
1473-
1474-
If you have no reasons to separate your ``in_memory`` users from your
1475-
``user_db`` users, you can accomplish this even more easily by combining
1476-
the two sources into a single provider:
1477-
1478-
..configuration-block::
1479-
1480-
..code-block::yaml
1481-
1482-
# app/config/security.yml
1483-
security:
1484-
providers:
1485-
main_provider:
1486-
memory:
1487-
users:
1488-
foo:{ password: test }
1489-
entity:
1490-
class:Acme\UserBundle\Entity\User,
1491-
property:username
1492-
1493-
..code-block::xml
1494-
1495-
<!-- app/config/security.xml-->
1496-
<config>
1497-
<providername=="main_provider">
1498-
<memory>
1499-
<username="foo"password="test" />
1500-
</memory>
1501-
<entityclass="Acme\UserBundle\Entity\User"property="username" />
1502-
</provider>
1503-
</config>
1504-
1505-
..code-block::php
1506-
1507-
// app/config/security.php
1508-
$container->loadFromExtension('security', array(
1509-
'providers' => array(
1510-
'main_provider' => array(
1511-
'memory' => array(
1512-
'users' => array(
1513-
'foo' => array('password' => 'test'),
1514-
),
1515-
),
1516-
'entity' => array('class' => 'Acme\UserBundle\Entity\User', 'property' => 'username'),
1517-
),
1518-
),
1519-
));
1520-
15211472
You can also configure the firewall or individual authentication mechanisms
15221473
to use a specific provider. Again, unless a provider is specified explicitly,
15231474
the first provider is always used:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp