openldap: implement SASL authentication

As credentials can be quite different depending on the mechanism used,
there are no default mechanisms for LDAP and simple bind with a DN is
then used.

The caller has to provide mechanism(s) using CURLOPT_LOGIN_OPTIONS to
enable SASL authentication and disable simple bind.

Closes #8152
This commit is contained in:
Patrick Monnerat 2022-01-10 11:57:02 +01:00 committed by Daniel Stenberg
parent ce5463e60c
commit eeca818b1e
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
8 changed files with 332 additions and 35 deletions

View file

@ -1,6 +1,6 @@
Long: login-options
Arg: <options>
Protocols: IMAP POP3 SMTP
Protocols: IMAP LDAP POP3 SMTP
Help: Server login options
Added: 7.34.0
Category: imap pop3 smtp auth

View file

@ -1,7 +1,7 @@
Long: oauth2-bearer
Help: OAuth 2 Bearer Token
Arg: <token>
Protocols: IMAP POP3 SMTP HTTP
Protocols: IMAP LDAP POP3 SMTP HTTP
Category: auth
Example: --oauth2-bearer "mF_9.B5f-4.1JqM" $URL
Added: 7.33.0