sign_request($sig_method, $test_consumer, NULL); if ($dump_request) { Header('Content-type: text/plain'); print "request url: " . $req_req->to_url(). "\n"; print_r($req_req); exit; } Header("Location: $req_req"); } else if ($action == "authorize") { $callback_url = "$base_url/client.php?key=$key&secret=$secret&token=$token&token_secret=$token_secret&endpoint=" . urlencode($endpoint); $auth_url = $endpoint . "?oauth_token=$token&oauth_callback=".urlencode($callback_url); if ($dump_request) { Header('Content-type: text/plain'); print("auth_url: " . $auth_url); exit; } Header("Location: $auth_url"); } else if ($action == "access_token") { $parsed = parse_url($endpoint); $params = array(); parse_str($parsed['query'], $params); $acc_req = OAuthRequest::from_consumer_and_token($test_consumer, $test_token, "GET", $endpoint, $params); $acc_req->sign_request($sig_method, $test_consumer, $test_token); if ($dump_request) { Header('Content-type: text/plain'); print "request url: " . $acc_req->to_url() . "\n"; print_r($acc_req); exit; } Header("Location: $acc_req"); } ?>
This is a test client that will let you test your OAuth server code. Enter the appropriate information below to test.
Note: we don't store any of the information you type in.