From 08cf6780ba8ea242cb451f07e14bb572079e22cf Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 8 Oct 2008 10:39:43 +0000 Subject: - Igor Novoseltsev brought a patch that introduced two new options to curl_easy_setopt: CURLOPT_USERNAME and CURLOPT_PASSWORD that sort of deprecates the good old CURLOPT_USERPWD since they allow applications to set the user name and password independently and perhaps more importantly allow both to contain colon(s) which CURLOPT_USERPWD doesn't fully support. --- docs/libcurl/curl_easy_setopt.3 | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'docs/libcurl/curl_easy_setopt.3') diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3 index 7d30fa697..36d956d94 100644 --- a/docs/libcurl/curl_easy_setopt.3 +++ b/docs/libcurl/curl_easy_setopt.3 @@ -601,14 +601,34 @@ to prevent accidental information leakage. Pass a char * as parameter, which should be [user name]:[password] to use for the connection to the HTTP proxy. Use \fICURLOPT_PROXYAUTH\fP to decide authentication method. +.IP CURLOPT_USERNAME +Pass a char * as parameter, which should be pointing to the zero terminated +user name to use for the transfer. + +The CURLOPT_USERNAME option should be used in same way as the +\fICURLOPT_USERPWD\fP is used. In comparison to \fICURLOPT_USERPWD\fP the +CURLOPT_USERNAME allows the username to contain colon, like in following +example: "sip:user@example.com". Note the CURLOPT_USERNAME option is an +alternative way to set the user name. There is no meaning to use it together +with the \fICURLOPT_USERPWD\fP option. + +In order to specify the password to be used in conjunction with the user name +use the \fICURLOPT_PASSWORD\fP option. (Added in 7.19.1) +.IP CURLOPT_PASSWORD +Pass a char * as parameter, which should be pointing to the zero terminated +password to use for the transfer. + +The CURLOPT_PASSWORD option should be used in conjunction with +as the \fICURLOPT_USERNAME\fP option. (Added in 7.19.1) .IP CURLOPT_HTTPAUTH Pass a long as parameter, which is set to a bitmask, to tell libcurl what authentication method(s) you want it to use. The available bits are listed below. If more than one bit is set, libcurl will first query the site to see what authentication methods it supports and then pick the best one you allow it to use. For some methods, this will induce an extra network round-trip. Set -the actual name and password with the \fICURLOPT_USERPWD\fP option. (Added in -7.10.6) +the actual name and password with the \fICURLOPT_USERPWD\fP option or +with the \fICURLOPT_USERNAME\fP and the \fICURLOPT_USERPASSWORD\fP options. +(Added in 7.10.6) .RS .IP CURLAUTH_BASIC HTTP Basic authentication. This is the default choice, and the only method -- cgit v1.2.3