@@ -482,6 +482,8 @@ Configuration example for form login and query_string
482
482
service : Symfony\Component\Ldap\Ldap
483
483
dn_string : ' dc=example,dc=com'
484
484
query_string : ' (&(uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))'
485
+ search_dn : ' ...'
486
+ search_password : ' the-raw-password'
485
487
486
488
.. code-block :: xml
487
489
@@ -498,7 +500,9 @@ Configuration example for form login and query_string
498
500
<form-login-ldap
499
501
service =" Symfony\Component\Ldap\Ldap"
500
502
dn-string =" dc=example,dc=com"
501
- query-string =" (& (uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))" />
503
+ query-string =" (& (uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))"
504
+ search-dn =" ..."
505
+ search-password =" the-raw-password" />
502
506
</firewall >
503
507
</config >
504
508
</srv : container >
@@ -515,12 +519,19 @@ Configuration example for form login and query_string
515
519
'service' => Ldap::class,
516
520
'dn_string' => 'dc=example,dc=com',
517
521
'query_string' => '(& (uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))',
522
+ 'search_dn' => '...',
523
+ 'search_password' => 'the-raw-password',
518
524
// ...
519
525
],
520
526
],
521
527
]
522
528
]);
523
529
530
+ .. deprecated :: 4.4
531
+
532
+ Using the ``query_string `` config option without defining ``search_dn `` and
533
+ ``search_password `` is deprecated since Symfony 4.4.
534
+
524
535
.. _`LDAP PHP extension` : http://www.php.net/manual/en/intro.ldap.php
525
536
.. _`RFC4515` : http://www.faqs.org/rfcs/rfc4515.html
526
537
.. _`LDAP injection` : http://projects.webappsec.org/w/page/13246947/LDAP%20Injection
0 commit comments