Mercurial > hg > orthanc-stone
comparison Framework/Oracle/HttpCommand.h @ 1079:e6d2ff8f1ab4 broker
credentials in HttpCommand
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 17 Oct 2019 21:25:03 +0200 |
parents | 18d53a8b41b7 |
children | 8e3763d1736a |
comparison
equal
deleted
inserted
replaced
1078:53d9c3b96b9e | 1079:e6d2ff8f1ab4 |
---|---|
67 Orthanc::HttpMethod method_; | 67 Orthanc::HttpMethod method_; |
68 std::string url_; | 68 std::string url_; |
69 std::string body_; | 69 std::string body_; |
70 HttpHeaders headers_; | 70 HttpHeaders headers_; |
71 unsigned int timeout_; | 71 unsigned int timeout_; |
72 std::string username_; | |
73 std::string password_; | |
72 | 74 |
73 public: | 75 public: |
74 HttpCommand(); | 76 HttpCommand(); |
75 | 77 |
76 virtual Type GetType() const | 78 virtual Type GetType() const |
135 | 137 |
136 unsigned int GetTimeout() const | 138 unsigned int GetTimeout() const |
137 { | 139 { |
138 return timeout_; | 140 return timeout_; |
139 } | 141 } |
142 | |
143 void SetCredentials(const std::string& username, | |
144 const std::string& password) | |
145 { | |
146 username_ = username; | |
147 password_ = password; | |
148 } | |
149 | |
150 void ClearCredentials() | |
151 { | |
152 username_.clear(); | |
153 password_.clear(); | |
154 } | |
155 | |
156 bool HasCredentials() const | |
157 { | |
158 return !username_.empty(); | |
159 } | |
160 | |
161 const std::string& GetUsername() const; | |
162 | |
163 const std::string& GetPassword() const; | |
140 }; | 164 }; |
141 } | 165 } |