GNURLOPT_SASL_AUTHZID(3)
π GNURLOPT_SASL_AUTHZID(3) π
Okay bestie, welcome to the GNURLOPT_SASL_AUTHZID(3) page β you're in the curl_easy_setopt options manual, and this is the authorisation-identity era. β¨
πΈ NAME πΈ
CURLOPT_SASL_AUTHZID β authorisation identity (identity to act as). Yep, it's the "who am I acting as?" option, and it's giving main-character energy. π
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SASL_AUTHZID, char
*authzid);
π DESCRIPTION π
Pass a char * as the parameter, bestie. It should point at the null-terminated authorisation identity (authzid) for the transfer. This only applies to the PLAIN SASL authentication mechanism, where it's optional. π«Ά
When it's not specified, only the authentication identity (authcid) as specified by the username gets sent to the server, along with the password. The server will derive an authzid from the authcid when it's not provided, and then it will use it internally. π
When the authzid is specified β and its use is server dependent β it can be used to access another user's inbox that the user has been granted access to, or a shared mailbox, for example. π
π DEFAULT π
blank β that's the default, no cap. π
π¦ PROTOCOLS π¦
IMAP, POP3 and SMTP. Those are the vibes. π
π₯ EXAMPLE π₯
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "imap://example.com/");
curl_easy_setopt(curl, CURLOPT_USERNAME, "Kurt");
curl_easy_setopt(curl, CURLOPT_PASSWORD, "xipj3plmq");
curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "Ursel");
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
β AVAILABILITY β
Added in 7.66.0. Iconic. π«
π RETURN VALUE π
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. Simple as that, bestie. β
π SEE ALSO π
CURLOPT_USERNAME(3)β username reference, bestie.CURLOPT_PASSWORD(3)β password reference, obviously..BRCURLOPT_USERPWD(3)β yes, that's the exact SEE ALSO string on this page; keep it exactly as written. π
Later, bestie β this page is from libcurl 7.66.0, dated 11 Sep 2019. ππ¦π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms