Mercurial > hg > orthanc-stone
comparison Framework/Oracle/HttpCommand.cpp @ 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 | 87fbeb823375 |
comparison
equal
deleted
inserted
replaced
1078:53d9c3b96b9e | 1079:e6d2ff8f1ab4 |
---|---|
74 { | 74 { |
75 LOG(ERROR) << "HttpCommand::GetBody(): method_ not _Post or _Put"; | 75 LOG(ERROR) << "HttpCommand::GetBody(): method_ not _Post or _Put"; |
76 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); | 76 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); |
77 } | 77 } |
78 } | 78 } |
79 | |
80 | |
81 const std::string& HttpCommand::GetUsername() const | |
82 { | |
83 if (HasCredentials()) | |
84 { | |
85 return username_; | |
86 } | |
87 else | |
88 { | |
89 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); | |
90 } | |
91 } | |
92 | |
93 | |
94 const std::string& HttpCommand::GetPassword() const | |
95 { | |
96 if (HasCredentials()) | |
97 { | |
98 return password_; | |
99 } | |
100 else | |
101 { | |
102 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); | |
103 } | |
104 } | |
79 } | 105 } |