|
| oauth1_config (utility::string_t consumer_key, utility::string_t consumer_secret, utility::string_t temp_endpoint, utility::string_t auth_endpoint, utility::string_t token_endpoint, utility::string_t callback_uri, oauth1_method method, utility::string_t realm=utility::string_t()) |
|
_ASYNCRTIMP pplx::task< utility::string_t > | build_authorization_uri () |
| Builds an authorization URI to be loaded in a web browser/view. The URI is built with auth_endpoint() as basis. The method creates a task for HTTP request to first obtain a temporary token. The authorization URI build based on this token. More...
|
|
_ASYNCRTIMP pplx::task< void > | token_from_redirected_uri (const web::http::uri &redirected_uri) |
| Fetch an access token based on redirected URI. The URI is expected to contain 'oauth_verifier' parameter, which is then used to fetch an access token using the token_from_verifier() method. See: http://tools.ietf.org/html/rfc5849#section-2.2 The received 'oauth_token' is parsed and verified to match the current token(). When access token is successfully obtained, set_token() is called, and config is ready for use by oauth1_handler. More...
|
|
pplx::task< void > | token_from_verifier (utility::string_t verifier) |
| Creates a task with HTTP request to fetch an access token from the token endpoint. The request exchanges a verifier code to an access token. If successful, the resulting token is set as active via set_token(). See: http://tools.ietf.org/html/rfc5849#section-2.3 More...
|
|
pplx::task< void > | refresh_token (const utility::string_t &key) |
| Creates a task with HTTP request to fetch an access token from the token endpoint. If successful, the resulting token is set as active via set_token(). More...
|
|
const utility::string_t & | consumer_key () const |
| Get consumer key used in authorization and authentication. More...
|
|
void | set_consumer_key (utility::string_t key) |
| Set consumer key used in authorization and authentication. More...
|
|
const utility::string_t & | consumer_secret () const |
| Get consumer secret used in authorization and authentication. More...
|
|
void | set_consumer_secret (utility::string_t secret) |
| Set consumer secret used in authorization and authentication. More...
|
|
const utility::string_t & | temp_endpoint () const |
| Get temporary token endpoint URI string. More...
|
|
void | set_temp_endpoint (utility::string_t temp_endpoint) |
| Set temporary token endpoint URI string. More...
|
|
const utility::string_t & | auth_endpoint () const |
| Get authorization endpoint URI string. More...
|
|
void | set_auth_endpoint (utility::string_t auth_endpoint) |
| Set authorization endpoint URI string. More...
|
|
const utility::string_t & | token_endpoint () const |
| Get token endpoint URI string. More...
|
|
void | set_token_endpoint (utility::string_t token_endpoint) |
| Set token endpoint URI string. More...
|
|
const utility::string_t & | callback_uri () const |
| Get callback URI string. More...
|
|
void | set_callback_uri (utility::string_t callback_uri) |
| Set callback URI string. More...
|
|
_ASYNCRTIMP const oauth1_token & | token () const |
| Get token. More...
|
|
void | set_token (oauth1_token token) |
| Set token. More...
|
|
const oauth1_method & | method () const |
| Get signature method. More...
|
|
void | set_method (oauth1_method method) |
| Set signature method. More...
|
|
const utility::string_t & | realm () const |
| Get authentication realm. More...
|
|
void | set_realm (utility::string_t realm) |
| Set authentication realm. More...
|
|
bool | is_enabled () const |
| Returns enabled state of the configuration. The oauth1_handler will perform OAuth 1.0 authentication only if this method returns true. Return value is true if access token is valid (=fetched or manually set) and both consumer_key() and consumer_secret() are set (=non-empty). More...
|
|
_ASYNCRTIMP utility::string_t | _build_signature_base_string (http_request request, details::oauth1_state state) const |
|
utility::string_t | _build_hmac_sha1_signature (http_request request, details::oauth1_state state) const |
|
utility::string_t | _build_plaintext_signature () const |
|
details::oauth1_state | _generate_auth_state (utility::string_t extra_key, utility::string_t extra_value) |
|
details::oauth1_state | _generate_auth_state () |
|
const std::map< utility::string_t, utility::string_t > & | parameters () const |
| Gets map of parameters to sign. More...
|
|
void | add_parameter (const utility::string_t &key, const utility::string_t &value) |
| Adds a key value parameter. More...
|
|
void | add_parameter (utility::string_t &&key, utility::string_t &&value) |
| Adds a key value parameter. More...
|
|
void | set_parameters (const std::map< utility::string_t, utility::string_t > ¶meters) |
| Sets entire map or parameters replacing all previously values. More...
|
|
void | clear_parameters () |
| Clears all parameters. More...
|
|
OAuth 1.0 configuration class.