summaryrefslogtreecommitdiffabout
path: root/include/opkele/oauth/consumer.h
Side-by-side diff
Diffstat (limited to 'include/opkele/oauth/consumer.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/oauth/consumer.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/opkele/oauth/consumer.h b/include/opkele/oauth/consumer.h
index 1e2784c..9196297 100644
--- a/include/opkele/oauth/consumer.h
+++ b/include/opkele/oauth/consumer.h
@@ -1,18 +1,19 @@
#ifndef __OPKELE_OAUTH_CONSUMER_H
#define __OPKELE_OAUTH_CONSUMER_H
#include <string>
#include <opkele/types.h>
#include <opkele/oauth.h>
+#include <opkele/curl.h>
namespace opkele {
namespace oauth {
using std::string;
enum oauth_method_t {
oauth_auth_header, oauth_post_body, oauth_url_query
};
struct service_endpoint_t {
string url;
string signature_method;
@@ -32,26 +33,30 @@ namespace opkele {
virtual const service_endpoint_t& get_access_token_endpoint() const = 0;
virtual service_endpoint_t& get_url_endpoint(service_endpoint_t& sep,
const string& url) const = 0;
};
struct http_request_t {
string authorize_header;
string method;
string url;
string body;
+ util::curl_slist_t _curl_headers_list;
+
http_request_t(const string& m,const string& u)
: method(m), url(u) { }
+
+ void setup_curl(CURL *curl);
};
class basic_consumer {
public:
token_t consumer_token;
basic_consumer(const token_t& ct)
: consumer_token(ct) { }
virtual ~basic_consumer() { }
virtual const basic_provider_endpoints& get_endpoints() const = 0;
virtual const string allocate_nonce(time_t ts) = 0;