1

I developed a basic authentication with libcurl in this way:

curl_easy_setopt(curl, CURLOPT_URL, "http://192.168.1.133:8080/myrep");
curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
curl_easy_setopt(curl, CURLOPT_PASSWORD, "passwd");

I want to develop also the digest authentication with libcurl.

How to do it.

Did Libcurl support this behaviour

1) --> client send to the server a http request without authentication fields

2) <-- server respond with 401 need digest authentication and providing the authrealm

3) --> client send the same http message with digest authentication using the received authrealm

4) <-- In case of success. The server send authentication success and the client detect it via libcurl

5) <-- In case of failure. The server resend the 401 message and The client detect it via libcurl

1 Answer 1

2

yes, libcurl supports it. See CURLOPT_HTTPAUTH and then especially the CURLAUTH_DIGEST bit.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.