Mercurial > hg > orthanc
changeset 144:aa6c8a942952
http client password
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 11 Oct 2012 14:39:38 +0200 |
parents | f1aeec53795b |
children | efe5be1d6afc |
files | OrthancCppClient/HttpClient.cpp OrthancCppClient/HttpClient.h Resources/Configuration.json |
diffstat | 3 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancCppClient/HttpClient.cpp Thu Oct 11 13:02:32 2012 +0200 +++ b/OrthancCppClient/HttpClient.cpp Thu Oct 11 14:39:38 2012 +0200 @@ -197,4 +197,12 @@ return false; } } + + + void HttpClient::SetPassword(const char* username, + const char* password) + { + std::string s = std::string(username) + ":" + std::string(password); + CheckCode(curl_easy_setopt(pimpl_->curl_, CURLOPT_USERPWD, s.c_str())); + } }
--- a/OrthancCppClient/HttpClient.h Thu Oct 11 13:02:32 2012 +0200 +++ b/OrthancCppClient/HttpClient.h Thu Oct 11 14:39:38 2012 +0200 @@ -109,5 +109,7 @@ return HttpException::GetDescription(lastStatus_); } + void SetPassword(const char* username, + const char* password); }; }
--- a/Resources/Configuration.json Thu Oct 11 13:02:32 2012 +0200 +++ b/Resources/Configuration.json Thu Oct 11 14:39:38 2012 +0200 @@ -25,7 +25,7 @@ "DicomAet" : "ORTHANC", // Check whether the called AET corresponds during a DICOM request - "DicomCheckCalledAet" : false, + "DicomCheckCalledAet" : true, // The DICOM port "DicomPort" : 4242,