debugging request for access token
darcs-hash:20080606062958-84dde-3568ba98526687d81873bff77385d214c50cddfb.gz
This commit is contained in:
parent
5639c51892
commit
9136d18327
@ -187,11 +187,17 @@ class FinishremotesubscribeAction extends Action {
|
|||||||
|
|
||||||
function access_token($omb) {
|
function access_token($omb) {
|
||||||
|
|
||||||
|
common_debug('starting request for access token', __FILE__);
|
||||||
|
|
||||||
$con = omb_oauth_consumer();
|
$con = omb_oauth_consumer();
|
||||||
$tok = new OAuthToken($omb['token'], $omb['secret']);
|
$tok = new OAuthToken($omb['token'], $omb['secret']);
|
||||||
|
|
||||||
|
common_debug('using request token "'.$tok.'"', __FILE__);
|
||||||
|
|
||||||
$url = omb_service_uri($omb[OAUTH_ENDPOINT_ACCESS]);
|
$url = omb_service_uri($omb[OAUTH_ENDPOINT_ACCESS]);
|
||||||
|
|
||||||
|
common_debug('using access token url "'.$url.'"', __FILE__);
|
||||||
|
|
||||||
# XXX: Is this the right thing to do? Strip off GET params and make them
|
# XXX: Is this the right thing to do? Strip off GET params and make them
|
||||||
# POST params? Seems wrong to me.
|
# POST params? Seems wrong to me.
|
||||||
|
|
||||||
@ -209,10 +215,15 @@ class FinishremotesubscribeAction extends Action {
|
|||||||
|
|
||||||
# We re-use this tool's fetcher, since it's pretty good
|
# We re-use this tool's fetcher, since it's pretty good
|
||||||
|
|
||||||
|
common_debug('posting to access token url "'.$req->get_normalized_http_url().'"', __FILE__);
|
||||||
|
common_debug('posting request data "'.$req->to_postdata().'"', __FILE__);
|
||||||
|
|
||||||
$fetcher = Auth_Yadis_Yadis::getHTTPFetcher();
|
$fetcher = Auth_Yadis_Yadis::getHTTPFetcher();
|
||||||
$result = $fetcher->post($req->get_normalized_http_url(),
|
$result = $fetcher->post($req->get_normalized_http_url(),
|
||||||
$req->to_postdata());
|
$req->to_postdata());
|
||||||
|
|
||||||
|
common_debug('got result: "'.print_r($result,TRUE).'"', __FILE__);
|
||||||
|
|
||||||
if ($result->status != 200) {
|
if ($result->status != 200) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user