1CURLOPT_SASL_AUTHZID(3) curl_easy_setopt options CURLOPT_SASL_AUTHZID(3)
2
3
4
6 CURLOPT_SASL_AUTHZID - authorisation identity (identity to act as)
7
9 #include <curl/curl.h>
10
11 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SASL_AUTHZID, char *au‐
12 thzid);
13
15 Pass a char * as parameter, which should be pointing to the null-termi‐
16 nated authorisation identity (authzid) for the transfer. Only applica‐
17 ble to the PLAIN SASL authentication mechanism where it is optional.
18
19 When not specified only the authentication identity (authcid) as speci‐
20 fied by the username will be sent to the server, along with the pass‐
21 word. The server will derive a authzid from the authcid when not pro‐
22 vided, which it will then uses internally.
23
24 When the authzid is specified, the use of which is server dependent, it
25 can be used to access another user's inbox, that the user has been
26 granted access to, or a shared mailbox for example.
27
29 blank
30
32 IMAP, POP3 and SMTP
33
35 CURL *curl = curl_easy_init();
36 if(curl) {
37 curl_easy_setopt(curl, CURLOPT_URL, "imap://example.com/");
38 curl_easy_setopt(curl, CURLOPT_USERNAME, "Kurt");
39 curl_easy_setopt(curl, CURLOPT_PASSWORD, "xipj3plmq");
40 curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "Ursel");
41 ret = curl_easy_perform(curl);
42 curl_easy_cleanup(curl);
43 }
44
46 Added in 7.66.0
47
49 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION
50 if not.
51
53 CURLOPT_USERNAME(3), CURLOPT_PASSWORD(3), .BRCURLOPT_USERPWD[1m(3)
54
55
56
57libcurl 7.79.1 November 04, 2020 CURLOPT_SASL_AUTHZID(3)