diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-06-02 15:20:18 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-06-02 15:20:18 -0400 |
commit | 68242de9eff4c74cf7e245cc977e27734f7687cf (patch) | |
tree | 1783a6974c63c1fa69c19a676e695c5c22c1afdd /actions/remotesubscribe.php | |
parent | 53254d36ea30371b52d86208f9b6effae648f19d (diff) |
add some debugging output to request token request
darcs-hash:20080602192018-84dde-11f3092598ecd0d521e0243b5683eeb484180cbd.gz
Diffstat (limited to 'actions/remotesubscribe.php')
-rw-r--r-- | actions/remotesubscribe.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/actions/remotesubscribe.php b/actions/remotesubscribe.php index c61109d6a..6ae39dc7e 100644 --- a/actions/remotesubscribe.php +++ b/actions/remotesubscribe.php @@ -246,6 +246,8 @@ class RemotesubscribeAction extends Action { $params = array(); parse_str($parsed['query'], $params); + common_debug('remotesubscribe.php - building a POST message for request token call'); + $req = OAuthRequest::from_consumer_and_token($con, NULL, "POST", $url, $params); $listener = omb_local_id($omb[OAUTH_ENDPOINT_REQUEST]); @@ -254,6 +256,8 @@ class RemotesubscribeAction extends Action { return NULL; } + common_debug('remotesubscribe.php - request token listener = "' . $listener . '"'); + $req->set_parameter('omb_listener', $listener); $req->set_parameter('omb_version', OMB_VERSION_01); @@ -264,15 +268,25 @@ class RemotesubscribeAction extends Action { # We re-use this tool's fetcher, since it's pretty good $fetcher = Auth_Yadis_Yadis::getHTTPFetcher(); + + common_debug('remotesubscribe.php - request token URL = "'.$req->get_normalized_http_url().'"'); + common_debug('remotesubscribe.php - request token data = "'.$req->to_postdata().'"'); + $result = $fetcher->post($req->get_normalized_http_url(), $req->to_postdata()); if ($result->status != 200) { + common_debug('remotesubscribe.php - request token status = "' . $result->status . '"'); return NULL; } + common_debug('remotesubscribe.php - request token body = "' . $result->body . '"'); + parse_str($result->body, $return); + common_debug('remotesubscribe.php - request token token = "' . $return['oauth_token'] . '"'); + common_debug('remotesubscribe.php - request token secret = "' . $return['oauth_token_secret'] . '"'); + return array($return['oauth_token'], $return['oauth_token_secret']); } |