CURLOPT_LOGIN_OPTIONS.3 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. .\" generated by cd2nroff 0.1 from CURLOPT_LOGIN_OPTIONS.md
  2. .TH CURLOPT_LOGIN_OPTIONS 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_LOGIN_OPTIONS \- login options
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOGIN_OPTIONS, char *options);
  9. .fi
  10. .SH DESCRIPTION
  11. Pass a char pointer as parameter, which should be pointing to the
  12. null\-terminated \fIoptions\fP string to use for the transfer.
  13. For more information about the login options please see RFC 2384, RFC 5092 and
  14. the IETF draft \fBdraft\-earhart\-url\-smtp\-00.txt\fP.
  15. \fICURLOPT_LOGIN_OPTIONS(3)\fP can be used to set protocol specific login options,
  16. such as the preferred authentication mechanism via "AUTH=NTLM" or "AUTH=*",
  17. and should be used in conjunction with the \fICURLOPT_USERNAME(3)\fP option.
  18. Since 8.2.0, IMAP supports the login option "AUTH=+LOGIN". With this option,
  19. curl uses the plain (not SASL) LOGIN IMAP command even if the server
  20. advertises SASL authentication. Care should be taken in using this option, as
  21. it sends your password in plain text. This does not work if the IMAP server
  22. disables the plain LOGIN (e.g. to prevent password snooping).
  23. The application does not have to keep the string around after setting this
  24. option.
  25. .SH DEFAULT
  26. NULL
  27. .SH PROTOCOLS
  28. This functionality affects imap, ldap, pop3 and smtp
  29. .SH EXAMPLE
  30. .nf
  31. int main(void)
  32. {
  33. CURL *curl = curl_easy_init();
  34. if(curl) {
  35. CURLcode res;
  36. curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
  37. curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=*");
  38. res = curl_easy_perform(curl);
  39. curl_easy_cleanup(curl);
  40. }
  41. }
  42. .fi
  43. .SH HISTORY
  44. Support for OpenLDAP added in 7.82.0.
  45. .SH AVAILABILITY
  46. Added in curl 7.34.0
  47. .SH RETURN VALUE
  48. Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
  49. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  50. .SH SEE ALSO
  51. .BR CURLOPT_PASSWORD (3),
  52. .BR CURLOPT_USERNAME (3)