1CURLOPT_SASL_AUTHZID(3)    curl_easy_setopt options    CURLOPT_SASL_AUTHZID(3)
2
3
4

NAME

6       CURLOPT_SASL_AUTHZID - authorization identity (identity to act as)
7

SYNOPSIS

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

DESCRIPTION

14       Pass a char * as parameter, which should be pointing to the null-termi‐
15       nated authorization identity (authzid) for the transfer. Only  applica‐
16       ble to the PLAIN SASL authentication mechanism where it is optional.
17
18       When not specified only the authentication identity (authcid) as speci‐
19       fied by the username will be sent to the server, along with  the  pass‐
20       word.  The  server will derive a authzid from the authcid when not pro‐
21       vided, which it will then uses internally.
22
23       When the authzid is specified, the use of which is server dependent, it
24       can  be  used  to  access  another user's inbox, that the user has been
25       granted access to, or a shared mailbox for example.
26

DEFAULT

28       blank
29

PROTOCOLS

31       IMAP, LDAP, POP3 and SMTP
32

EXAMPLE

34       CURL *curl = curl_easy_init();
35       if(curl) {
36         curl_easy_setopt(curl, CURLOPT_URL, "imap://example.com/");
37         curl_easy_setopt(curl, CURLOPT_USERNAME, "Kurt");
38         curl_easy_setopt(curl, CURLOPT_PASSWORD, "xipj3plmq");
39         curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "Ursel");
40         ret = curl_easy_perform(curl);
41         curl_easy_cleanup(curl);
42       }
43

AVAILABILITY

45       Added in 7.66.0. Support for OpenLDAP added in 7.82.0.
46

RETURN VALUE

48       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
49       if not.
50

SEE ALSO

52       CURLOPT_USERNAME(3), CURLOPT_PASSWORD(3), .BRCURLOPT_USERPWD(3)
53
54
55
56libcurl 7.85.0                   May 17, 2022          CURLOPT_SASL_AUTHZID(3)
Impressum