OpenAB  1.0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
BasicHttpAuthorizer.hpp
Go to the documentation of this file.
1 /*
2  * This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5  */
10 #ifndef BASICHTTPAUTHORIZER_HPP_
11 #define BASICHTTPAUTHORIZER_HPP_
12 
13 #include <helpers/SecureString.hpp>
14 #include <helpers/Http.hpp>
15 
16 namespace OpenAB
17 {
23 {
24  public:
29 
33  virtual ~BasicHttpAuthorizer();
34 
40  void setCredentials (const std::string& login,
41  const OpenAB::SecureString& password);
42 
43  bool authorizeMessage (HttpMessage* curl);
44 
45  private:
50 
54  BasicHttpAuthorizer& operator=(BasicHttpAuthorizer const &other);
55 
56  std::string login;
58 };
59 
60 } //namespace OpenAB
61 #endif // BASICHTTPAUTHORIZER_HPP_
HttpAuthorizer interface. This should be used by classes implementing different Http authorization me...
Definition: Http.hpp:334
SecureString class, used to store strings like passwords etc. Current implementation encodes string i...
Definition: SecureString.hpp:26
void setCredentials(const std::string &login, const OpenAB::SecureString &password)
Sets user credentials.
Definition: BasicHttpAuthorizer.cpp:25
virtual ~BasicHttpAuthorizer()
Destructor, virtual by default.
Definition: BasicHttpAuthorizer.cpp:21
bool authorizeMessage(HttpMessage *curl)
Authorizes message.
Definition: BasicHttpAuthorizer.cpp:32
Class BasicHttpAuthorizer. Implements HTTP Basic authentication method.
Definition: BasicHttpAuthorizer.hpp:22
BasicHttpAuthorizer()
Constructor.
Definition: BasicHttpAuthorizer.cpp:17
HttpMessage class. Represents Http request that can be executed using HttpSession object...
Definition: Http.hpp:95