CURLOPT_SASL_AUTHZID.3 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. .\" generated by cd2nroff 0.1 from CURLOPT_SASL_AUTHZID.md
  2. .TH CURLOPT_SASL_AUTHZID 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_SASL_AUTHZID \- authorization identity (identity to act as)
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SASL_AUTHZID, char *authzid);
  9. .fi
  10. .SH DESCRIPTION
  11. Pass a char pointer as parameter, which should be pointing to the
  12. null\-terminated authorization identity (\fIauthzid\fP) for the transfer. Only
  13. applicable to the PLAIN SASL authentication mechanism where it is optional.
  14. When not specified only the authentication identity (\fIauthcid\fP) as
  15. specified by the username is sent to the server, along with the password. The
  16. server derives a \fIauthzid\fP from the \fIauthcid\fP when not provided, which
  17. it then uses internally.
  18. When the \fIauthzid\fP is specified, the use of which is server dependent, it
  19. can be used to access another user\(aqs inbox, that the user has been granted
  20. access to, or a shared mailbox for example.
  21. .SH DEFAULT
  22. blank
  23. .SH PROTOCOLS
  24. This functionality affects imap only
  25. .SH EXAMPLE
  26. .nf
  27. int main(void)
  28. {
  29. CURL *curl = curl_easy_init();
  30. if(curl) {
  31. CURLcode res;
  32. curl_easy_setopt(curl, CURLOPT_URL, "imap://example.com/");
  33. curl_easy_setopt(curl, CURLOPT_USERNAME, "Kurt");
  34. curl_easy_setopt(curl, CURLOPT_PASSWORD, "xipj3plmq");
  35. curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "Ursel");
  36. res = curl_easy_perform(curl);
  37. curl_easy_cleanup(curl);
  38. }
  39. }
  40. .fi
  41. .SH AVAILABILITY
  42. Added in curl 7.66.0
  43. .SH RETURN VALUE
  44. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  45. .SH SEE ALSO
  46. .BR CURLOPT_PASSWORD (3),
  47. .BR CURLOPT_USERNAME (3),
  48. .BR CURLOPT_USERPWD (3)