File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,19 @@ distinguished name (DN) and the password of a user::
74
74
75
75
When the LDAP server allows unauthenticated binds, a blank password will always be valid.
76
76
77
+ You can also use the :method: `Symfony\\ Component\\ Ldap\\ Ldap::saslBind ` method
78
+ for binding to an LDAP server using `SASL `_::
79
+
80
+ // this method defines other optional arguments like $mech, $realm, $authcId, etc.
81
+ $ldap->saslBind($dn, $password);
82
+
83
+ After binding to the LDAP server, you can use the :method: `Symfony\\ Component\\ Ldap\\ Ldap::whoami `
84
+ method to get the distinguished name (DN) of the authenticated and authorized user.
85
+
86
+ .. versionadded :: 7.2
87
+
88
+ The ``saslBind() `` and ``whoami() `` methods were introduced in Symfony 7.2.
89
+
77
90
Once bound (or if you enabled anonymous authentication on your
78
91
LDAP server), you may query the LDAP server using the
79
92
:method: `Symfony\\ Component\\ Ldap\\ Ldap::query ` method::
@@ -183,3 +196,5 @@ Possible operation types are ``LDAP_MODIFY_BATCH_ADD``, ``LDAP_MODIFY_BATCH_REMO
183
196
``LDAP_MODIFY_BATCH_REMOVE_ALL ``, ``LDAP_MODIFY_BATCH_REPLACE ``. Parameter
184
197
``$values `` must be ``NULL `` when using ``LDAP_MODIFY_BATCH_REMOVE_ALL ``
185
198
operation type.
199
+
200
+ .. _`SASL` : https://en.wikipedia.org/wiki/Simple_Authentication_and_Security_Layer
You can’t perform that action at this time.
0 commit comments