Skip to content

Commit 95bf4da

Browse files
committed
Update reference/configuration/security.rst
Added PHP and XML examples.
1 parent b784172 commit 95bf4da

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

reference/configuration/security.rst

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,30 @@ To use HTTP-Digest authentication you need to provide a realm and a key:
292292

293293
.. configuration-block::
294294

295-
.. code-block:: yaml
296-
297-
# app/config/security.yml
298-
security:
299-
firewalls:
300-
somename:
301-
http_digest:
302-
key: "a_random_string"
303-
realm: "secure-api"
304-
295+
.. code-block:: yaml
296+
# app/config/security.yml
297+
security:
298+
firewalls:
299+
somename:
300+
http_digest:
301+
key: "a_random_string"
302+
realm: "secure-api"
303+
304+
.. code-block:: xml
305+
<security:config>
306+
<firewall name="somename">
307+
<http-digest key="a_random_string" realm="secure-api" />
308+
</firewall>
309+
</security:config>
310+
311+
.. code-block:: php
312+
$container->loadFromExtension('security', array(
313+
'firewalls' => array(
314+
'somename' => array(
315+
'http_digest' => array(
316+
'key' => 'a_random_string',
317+
'realm' => 'secure-api',
318+
),
319+
),
320+
),
321+
));

0 commit comments

Comments
 (0)