diff --git a/backends/twitter/libtwitcurl/oauthlib.h b/backends/twitter/libtwitcurl/oauthlib.h index 880a7b889c7b93250126f2a8dc3b8564f298bae6..5f702e014105b3ec740427c57ebbad487ccfb122 100644 --- a/backends/twitter/libtwitcurl/oauthlib.h +++ b/backends/twitter/libtwitcurl/oauthlib.h @@ -41,9 +41,9 @@ namespace oAuthLibDefaults namespace oAuthTwitterApiUrls { /* Twitter OAuth API URLs */ - const std::string OAUTHLIB_TWITTER_REQUEST_TOKEN_URL = "http://twitter.com/oauth/request_token"; - const std::string OAUTHLIB_TWITTER_AUTHORIZE_URL = "http://twitter.com/oauth/authorize?oauth_token="; - const std::string OAUTHLIB_TWITTER_ACCESS_TOKEN_URL = "http://twitter.com/oauth/access_token"; + const std::string OAUTHLIB_TWITTER_REQUEST_TOKEN_URL = "twitter.com/oauth/request_token"; + const std::string OAUTHLIB_TWITTER_AUTHORIZE_URL = "twitter.com/oauth/authorize?oauth_token="; + const std::string OAUTHLIB_TWITTER_ACCESS_TOKEN_URL = "twitter.com/oauth/access_token"; }; typedef enum _eOAuthHttpRequestType @@ -90,19 +90,7 @@ public: bool extractOAuthTokenKeySecret( const std::string& requestTokenResponse /* in */ ); - oAuth clone() - { - oAuth cloneObj; - cloneObj.m_consumerKey = m_consumerKey; - cloneObj.m_consumerSecret = m_consumerSecret; - cloneObj.m_oAuthTokenKey = m_oAuthTokenKey; - cloneObj.m_oAuthTokenSecret = m_oAuthTokenSecret; - cloneObj.m_oAuthPin = m_oAuthPin; - cloneObj.m_nonce = m_nonce; - cloneObj.m_timeStamp = m_timeStamp; - cloneObj.m_oAuthScreenName = m_oAuthScreenName; - return cloneObj; - } + oAuth clone(); private: @@ -117,8 +105,11 @@ private: std::string m_oAuthScreenName; /* OAuth twitter related utility methods */ + void buildOAuthRawDataKeyValPairs( const std::string& rawData, /* in */ + bool urlencodeData, /* in */ + oAuthKeyValuePairs& rawDataKeyValuePairs /* out */ ); + bool buildOAuthTokenKeyValuePairs( const bool includeOAuthVerifierPin, /* in */ - const std::string& rawData, /* in */ const std::string& oauthSignature, /* in */ oAuthKeyValuePairs& keyValueMap /* out */, const bool generateTimestamp /* in */ );