1CURLOPT_LOGIN_OPTIONS(3)            libcurl           CURLOPT_LOGIN_OPTIONS(3)
2
3
4

NAME

6       CURLOPT_LOGIN_OPTIONS - login options
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOGIN_OPTIONS, char *options);
12

DESCRIPTION

14       Pass a char * as parameter, which should be pointing to the null-termi‐
15       nated options string to use for the transfer.
16
17       For more information about the login options please see RFC  2384,  RFC
18       5092 and the IETF draft draft-earhart-url-smtp-00.txt.
19
20       CURLOPT_LOGIN_OPTIONS(3) can be used to set protocol specific login op‐
21       tions, such as the preferred authentication mechanism  via  "AUTH=NTLM"
22       or  "AUTH=*",  and should be used in conjunction with the CURLOPT_USER‐
23       NAME(3) option.
24
25       Since 8.2.0, IMAP supports the login option  "AUTH=+LOGIN".  With  this
26       option,  curl  uses the plain (not SASL) LOGIN IMAP command even if the
27       server advertises SASL authentication. Care should be  taken  in  using
28       this option, as it will send out your password in plain text. This will
29       not work if the IMAP server disables the plain LOGIN (e.g.  to  prevent
30       password snooping).
31
32       The  application  does not have to keep the string around after setting
33       this option.
34

DEFAULT

36       NULL
37

PROTOCOLS

39       Only IMAP, LDAP, POP3 and SMTP support login options.
40

EXAMPLE

42       CURL *curl = curl_easy_init();
43       if(curl) {
44         curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
45         curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=*");
46         ret = curl_easy_perform(curl);
47         curl_easy_cleanup(curl);
48       }
49

AVAILABILITY

51       Added in 7.34.0. Support for OpenLDAP added in 7.82.0.
52

RETURN VALUE

54       Returns CURLE_OK if the option is  supported,  CURLE_UNKNOWN_OPTION  if
55       not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
56

SEE ALSO

58       CURLOPT_USERNAME(3), CURLOPT_PASSWORD(3),
59
60
61
62ibcurl 8.2.1                     June 25, 2023        CURLOPT_LOGIN_OPTIONS(3)
Impressum