1CURLOPT_LOGIN_OPTIONS(3) curl_easy_setopt options CURLOPT_LOGIN_OPTIONS(3)
2
3
4
6 CURLOPT_LOGIN_OPTIONS - login options
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOGIN_OPTIONS, char *options);
12
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 RFC2384,
18 RFC5092 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 The application does not have to keep the string around after setting
26 this option.
27
29 NULL
30
32 Only IMAP, LDAP, POP3 and SMTP support login options.
33
35 CURL *curl = curl_easy_init();
36 if(curl) {
37 curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
38 curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=*");
39 ret = curl_easy_perform(curl);
40 curl_easy_cleanup(curl);
41 }
42
44 Added in 7.34.0. Support for OpenLDAP added in 7.82.0.
45
47 Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if
48 not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
49
51 CURLOPT_USERNAME(3), CURLOPT_PASSWORD(3),
52
53
54
55libcurl 8.0.1 January 02, 2023 CURLOPT_LOGIN_OPTIONS(3)