curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Question: how to specify a different identity using IMAP PLAIN auth?

From: Julian Espérat via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 28 Feb 2019 22:39:50 +0100

I found out I can pass the authenticate command as a
CURLOPT_CUSTOMREQUEST. Except it breaks when cURL needs to reconnect,
because then it doesn't reauthenticate properly.

I think we need something like a CURLOPT_IMAP_IDENTITY to allow cURL
handling the authentication natively instead of as a custom command?

On Tue, Jan 29, 2019 at 6:08 PM Julian Espérat <savageman86_at_gmail.com> wrote:
>
> Hi,
>
> The IMAP AUTHENTICATE PLAIN commands expects the value to be
> base64(<identity>\0<username>\0<password>)
>
> I could not find how to tell cURL to use something else than the
> username in the the "identity" part of the AUTH command above, which
> is required to access a shared Office 365 inbox through IMAP.
>
> When using USERPWD="username:password" cURL sends the following IMAP command:
> AUTHENTICATE PLAIN <base64(username \0 username \0 password)>
>
> I tried different thing, including variations of
> USERPWD="username\identity:password" and "username:identity:password"
> but could not achieve it.
>
> Is there an option I missed? If not, can we do a feature request?
>
> Thanks a lot,
>
> Julian.

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-02-28