Skip to content

Commit e1bd569

Browse files
committed
Tweak
1 parent 4b52d34 commit e1bd569

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

reference/configuration/security.rst

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -663,9 +663,9 @@ X.509 Authentication
663663
main:
664664
# ...
665665
x509:
666-
provider: your_user_provider
667-
user: SSL_CLIENT_S_DN_Email
668-
credentials: SSL_CLIENT_S_DN
666+
provider: your_user_provider
667+
user: SSL_CLIENT_S_DN_Email
668+
credentials: SSL_CLIENT_S_DN
669669
user_identifier: emailAddress
670670
671671
.. code-block:: xml
@@ -705,7 +705,7 @@ X.509 Authentication
705705
->provider('your_user_provider')
706706
->user('SSL_CLIENT_S_DN_Email')
707707
->credentials('SSL_CLIENT_S_DN')
708-
->user_identifier('emailAddress')
708+
->userIdentifier('emailAddress')
709709
;
710710
};
711711
@@ -726,18 +726,24 @@ If the ``user`` parameter is not available, the name of the ``$_SERVER``
726726
parameter containing the full "distinguished name" of the certificate
727727
(exposed by e.g. Nginx).
728728

729-
By default, Symfony identifies the value following ``emailAddress=`` in this parameter.
730-
This can be changed using the ``user_identifier`` parameter.
729+
By default, Symfony identifies the value following ``emailAddress=`` in this
730+
parameter. This can be changed using the ``user_identifier`` option.
731731

732732
user_identifier
733-
...........
733+
...............
734734

735735
**type**: ``string`` **default**: ``emailAddress``
736736

737-
The ``user_identifier`` parameter is used to find the user identifier in the
738-
"distinguished name" e.g. ``Subject: C=FR, O=My Organization, CN=user1, [email protected]``.
737+
.. versionadded:: 6.3
738+
739+
The ``user_identifier`` option was introduced in Symfony 6.3.
740+
741+
The value of this option tells Symfony which parameter to use to find the user
742+
identifier in the "distinguished name".
739743

740-
By setting this parameter to ``CN``, the returned user identifier will be the "Common Name" ``user1``
744+
For example, if the "distinguished name" is
745+
``Subject: C=FR, O=My Organization, CN=user1, [email protected]``,
746+
and the value of this option is ``'CN'``, the user identifier will be ``'user1'``.
741747

742748
.. _reference-security-firewall-remote-user:
743749

security.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,8 +1316,8 @@ ways:
13161316
#. If it is not set (e.g. when using Nginx), it uses ``SSL_CLIENT_S_DN`` and
13171317
matches the value following ``emailAddress``.
13181318

1319-
You can customize the name of the three parameters under the ``x509`` key.
1320-
See :ref:`the configuration reference <reference-security-firewall-x509>`
1319+
You can customize the name of some parameters under the ``x509`` key.
1320+
See :ref:`the x509 configuration reference <reference-security-firewall-x509>`
13211321
for more details.
13221322

13231323
Remote Users

0 commit comments

Comments
 (0)