Skip to content

Commit

Permalink
Merge pull request #1078 from lubomirjurukov/master
Browse files Browse the repository at this point in the history
add support for CURLAUTH_NEGOTIATE
  • Loading branch information
COM8 authored Jul 9, 2024
2 parents b505019 + ad084e6 commit 538da45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cpr/session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ void Session::SetAuth(const Authentication& auth) {
curl_easy_setopt(curl_->handle, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
curl_easy_setopt(curl_->handle, CURLOPT_USERPWD, auth.GetAuthString());
break;
case AuthMode::NEGOTIATE:
curl_easy_setopt(curl_->handle, CURLOPT_HTTPAUTH, CURLAUTH_NEGOTIATE);
curl_easy_setopt(curl_->handle, CURLOPT_USERPWD, auth.GetAuthString());
break;
}
}

Expand Down
2 changes: 1 addition & 1 deletion include/cpr/auth.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace cpr {

enum class AuthMode { BASIC, DIGEST, NTLM };
enum class AuthMode { BASIC, DIGEST, NTLM, NEGOTIATE };

class Authentication {
public:
Expand Down

0 comments on commit 538da45

Please sign in to comment.