OpenAB  1.0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
OAuth2HttpAuthorizer.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 OAUTH2HTTPAUTHORIZER_HPP_
11 #define OAUTH2HTTPAUTHORIZER_HPP_
12 
13 #include "SecureString.hpp"
14 #include "Http.hpp"
15 
16 namespace OpenAB
17 {
24 {
25  public:
30 
34  virtual ~OAuth2HttpAuthorizer();
35 
43  bool authorize (const std::string& clientId,
44  const OpenAB::SecureString& clientSecret,
45  const OpenAB::SecureString& refreshToken);
46 
47  bool authorizeMessage (HttpMessage* curl);
48 
49  private:
54 
58  OAuth2HttpAuthorizer& operator=(OAuth2HttpAuthorizer const &other);
59 
61 };
62 
63 } //namespace OpenAB
64 #endif // OAUTH2AUTHORIZER_HPP_
HttpAuthorizer interface. This should be used by classes implementing different Http authorization me...
Definition: Http.hpp:334
OAuth2HttpAuthorizer()
Constructor.
Definition: OAuth2HttpAuthorizer.cpp:17
Class OAuth2HttpAuthorizer Implements OAuth2 authentication method.
Definition: OAuth2HttpAuthorizer.hpp:23
SecureString class, used to store strings like passwords etc. Current implementation encodes string i...
Definition: SecureString.hpp:26
virtual ~OAuth2HttpAuthorizer()
Destructor, virtual by default.
Definition: OAuth2HttpAuthorizer.cpp:21
bool authorize(const std::string &clientId, const OpenAB::SecureString &clientSecret, const OpenAB::SecureString &refreshToken)
Obtains new access token, based on provided data.
Definition: OAuth2HttpAuthorizer.cpp:25
HttpMessage class. Represents Http request that can be executed using HttpSession object...
Definition: Http.hpp:95
bool authorizeMessage(HttpMessage *curl)
Authorizes message.
Definition: OAuth2HttpAuthorizer.cpp:84