From 3b84c7fb07ab049e7109c71faced9761ae8279a3 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sun, 19 Jul 2009 11:03:44 -0400 Subject: [PATCH] phpdoc/ws --- framework/Oauth/lib/Horde/Oauth/Consumer.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/framework/Oauth/lib/Horde/Oauth/Consumer.php b/framework/Oauth/lib/Horde/Oauth/Consumer.php index 045aaa97a..f4d87204a 100644 --- a/framework/Oauth/lib/Horde/Oauth/Consumer.php +++ b/framework/Oauth/lib/Horde/Oauth/Consumer.php @@ -29,6 +29,7 @@ class Horde_Oauth_Consumer * 'secret' - Consumer secret * 'requestTokenUrl' - The request token URL * 'authorizeTokenUrl' - The authorize URL + * 'accessTokenUrl' = To obtain an access token * 'signatureMethod - Horde_Oauth_SignatureMethod object * * @@ -52,11 +53,11 @@ class Horde_Oauth_Consumer } /** - * Obtain a request token + * Obtain an unprivileged request token * * @param array $params Parameter array * - * @return Horde_Oauth_Token A OAuth request token + * @return Horde_Oauth_Token The oauth request token */ public function getRequestToken($params = array()) { @@ -71,13 +72,14 @@ class Horde_Oauth_Consumer $this->requestTokenUrl, $request->buildHttpQuery() ); + return Horde_Oauth_Token::fromString($response->getBody()); } /** - * Get the user authorization url + * Get the user authorization url used to request user authorization * - * @param Horde_Oauth_Token $token A OAuth token + * @param Horde_Oauth_Token $token the oauth request token * * @return string The user authorization url string */ @@ -87,9 +89,13 @@ class Horde_Oauth_Consumer } /** + * Obtain an access token from a request token * - * @param Horde_Oauth_Token $token - * @param $params + * @param Horde_Oauth_Token $token Open auth token containing the oauth_token + * returned from provider after authorization + * and the token secret returned with the + * original request token. + * @param array $params Any additional parameters for this request * * @return unknown_type */ @@ -106,6 +112,7 @@ class Horde_Oauth_Consumer $this->accessTokenUrl, $request->buildHttpQuery() ); + return Horde_Oauth_Token::fromString($response->getBody()); } -- 2.11.0