How to determine which authentication method to use?
I have a program that uses libcurl to retrieve mail from multiple POP3
servers, using URLs of the form pop3://username:password@server:port. It
had no problem fetching mail from most of the servers, but one of them
kept giving CURLE_LOGIN_DENIED errors.
The cURL changelog for version 7.31.0 mentions a new ;auth= parameter
supported by URL and CURLOPT_USERPWD. I haven't been able to find decent
documentation of this option on the cURL site, but based on the code (in
pop3.c), the supported options are:
* (any)
+APOP
LOGIN
PLAIN
CRAM-MD5
DIGEST-MD5
GSSAPI
NTLM
After some experimentation, I found that adding the ;auth=LOGIN parameter
to the URL allowed mail to be downloaded from that server.
Is there any method other than trial-and-error to determine which auth
option to use?
No comments:
Post a Comment