@@ -666,6 +666,7 @@ X.509 Authentication
666
666
provider : your_user_provider
667
667
user : SSL_CLIENT_S_DN_Email
668
668
credentials : SSL_CLIENT_S_DN
669
+ user_identifier : emailAddress
669
670
670
671
.. code-block :: xml
671
672
@@ -687,6 +688,7 @@ X.509 Authentication
687
688
<x509 provider =" your_user_provider"
688
689
user =" SSL_CLIENT_S_DN_Email"
689
690
credentials =" SSL_CLIENT_S_DN"
691
+ user_identifier =" emailAddress"
690
692
/>
691
693
</firewall >
692
694
</config >
@@ -703,6 +705,7 @@ X.509 Authentication
703
705
->provider('your_user_provider')
704
706
->user('SSL_CLIENT_S_DN_Email')
705
707
->credentials('SSL_CLIENT_S_DN')
708
+ ->user_identifier('emailAddress')
706
709
;
707
710
};
708
711
@@ -723,7 +726,18 @@ If the ``user`` parameter is not available, the name of the ``$_SERVER``
723
726
parameter containing the full "distinguished name" of the certificate
724
727
(exposed by e.g. Nginx).
725
728
726
- Symfony identifies the value following ``emailAddress= `` in this parameter.
729
+ By default, Symfony identifies the value following ``emailAddress= `` in this parameter.
730
+ This can be changed using the ``user_identifier `` parameter.
731
+
732
+ user_identifier
733
+ ...........
734
+
735
+ **type **: ``string `` **default **: ``emailAddress ``
736
+
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] ``.
739
+
740
+ By setting this parameter to ``CN ``, the returned user identifier will be the "Common Name" ``user1 ``
727
741
728
742
.. _reference-security-firewall-remote-user :
729
743
0 commit comments