From: Zach Copley Date: Fri, 8 Oct 2010 02:24:24 +0000 (-0700) Subject: Renamed the OAuth verify credentials test script X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=be1668a1bd8436952bd9ee36ed710fae9834643f;p=quix0rs-gnu-social.git Renamed the OAuth verify credentials test script --- diff --git a/tests/oauth/oauth_verify_creds.php b/tests/oauth/oauth_verify_creds.php new file mode 100755 index 0000000000..7eea6e7e74 --- /dev/null +++ b/tests/oauth/oauth_verify_creds.php @@ -0,0 +1,107 @@ +#!/usr/bin/env php +. + */ + +define('INSTALLDIR', realpath(dirname(__FILE__) . '/../..')); + +require_once INSTALLDIR . '/extlib/OAuth.php'; + +$shortoptions = 't:s:'; +$longoptions = array('oauth_token=', 'oauth_token_secret='); + +$helptext = <<sign_request($hmac_method, $consumer, $atok); + + $httpReq = httpRequest($oauthReq->to_url()); + +} catch (Exception $e) { + print "Error! HTTP response body: " . $httpReq->getBody(); + exit(1); +} + +print $httpReq->getBody(); + +function httpRequest($url) +{ + $request = HTTPClient::start(); + + $request->setConfig( + array( + 'follow_redirects' => true, + 'connect_timeout' => 120, + 'timeout' => 120, + 'ssl_verify_peer' => false, + 'ssl_verify_host' => false + ) + ); + + return $request->get($url); +} diff --git a/tests/oauth/verifycreds.php b/tests/oauth/verifycreds.php deleted file mode 100755 index 7eea6e7e74..0000000000 --- a/tests/oauth/verifycreds.php +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env php -. - */ - -define('INSTALLDIR', realpath(dirname(__FILE__) . '/../..')); - -require_once INSTALLDIR . '/extlib/OAuth.php'; - -$shortoptions = 't:s:'; -$longoptions = array('oauth_token=', 'oauth_token_secret='); - -$helptext = <<sign_request($hmac_method, $consumer, $atok); - - $httpReq = httpRequest($oauthReq->to_url()); - -} catch (Exception $e) { - print "Error! HTTP response body: " . $httpReq->getBody(); - exit(1); -} - -print $httpReq->getBody(); - -function httpRequest($url) -{ - $request = HTTPClient::start(); - - $request->setConfig( - array( - 'follow_redirects' => true, - 'connect_timeout' => 120, - 'timeout' => 120, - 'ssl_verify_peer' => false, - 'ssl_verify_host' => false - ) - ); - - return $request->get($url); -}