how could you get user credentials after getting auth token ? could you
please tell me :S i got down on this step
My generated signature on the last step after getting auth token is
different then google's generated signature, I tryed to create with the same
values the signature but they are not same :S
so where could be problem in your opinion ?
The results as given below:


This is my base string  :

GET&http%3A%2F%2Fwww-opensocial.googleusercontent.com<http://2fwww-opensocial.googleusercontent.com/>
%2Fapi%2Fpeople%2F%40me%2F%40self&oauth_consumer_key*%3Dwww.file4share.net<http://3dwww.file4share.net/>
%26*oauth_nonce*%3D58b600e9773540aafa65cb41b31238cf%26*
oauth_signature_method*%3DHMAC-SHA1%26*oauth_timestamp*%3D1259928326%26*
oauth_token*%3D1%252FJefQs9cHFI8Ha2e5YjdkUw%26*oauth_version*%3D*1.0
this is google's

GET&http%3A%2F%2Fwww-opensocial.googleusercontent.com
<http://2fwww-opensocial.googleusercontent.com/>%2Fapi%2Fpeople%2F%40me%2F%40self&oauth_consumer_key%3Dwww.file4share.net
<http://3dwww.file4share.net/>%26oauth_nonce%3D58b600e9773540aafa65cb41b31238cf%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1259928326%26oauth_token%3D1%252FJefQs9cHFI8Ha2e5YjdkUw%26oauth_version%3D1.0

Both of same but generated signatures are different , the most interesting
thing if my signature function is wrong how can i come to the this step ? i
am really sure mine is right so what is wrong on my signature string , could
you please write me in this step for generating signature is this right :
url :http://www-opensocial.googleusercontent.com/api/people/@me/@self
consumer key
consumer secret
second token string
second token secret string
method "GET"
Time span
Nonce


but google send me 401 or 403 error whatever i tryed i could not generated
the same signature with google for the same values :S
if my generate signature function is wrong how could i come to the this step
or do you use for signature any thing else or are there any function more ?





2009/12/4 Pushpa <[email protected]>

> Hi
>
> I am bot able to get AuthSubRevokeToken
> Below is my script
>
> step1.php
>
> <?
> $secure = 0;
> $session = 1;
> $scope = 'http://www.google.com/m8/feeds/';
> $next = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}";
>
> $token = @$_GET['token'];  // only a single use token
> $sessionToken = AuthSubSessionToken($token);
>
> if(!$token)
> {
> echo "<a href=\"https://www.google.com/accounts/AuthSubRequest?scope=
> $scope&session=$session&secure=$secure&next=$next<https://www.google.com/accounts/AuthSubRequest?scope=$scope&session=$session&secure=$secure&next=$next>\">Sign
> in to Google</
> a>";
> exit;
> }
> else
> {
> header('location:step2.php?token='.$token.'&session_token='.
> $sessionToken);
> }
>
>
>
> function AuthSubSessionToken($token) {
> $ch = curl_init("https://www.google.com/accounts/
> AuthSubSessionToken");
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
> curl_setopt($ch, CURLOPT_FAILONERROR, true);
> curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
> curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: AuthSub
> token="' . trim($token) . '"'));
>
> $result = curl_exec($ch);
> curl_close($ch);
> $splitStr = split("=", $result);
>
> return trim($splitStr[1]);
> }
>
> ?>
>
> step2.php
>
>    <?
>    $secure = 0;
>    $session = 1;
>    $scope = 'http://www.google.com/m8/feeds/';
>    $next = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}";
>
>    $token = $_GET['token'];  // only a single use token
>    $sessionToken = $_GET['session_token'];  // only a single use
> token
>
>   $AuthSubRevokeToken = AuthSubRevokeToken($sessionToken);
>   $AuthSubTokenInfo = AuthSubTokenInfo($token);
>
>   function AuthSubRevokeToken($token) {
>     $ch = curl_init("https://www.google.com/accounts/
> AuthSubRevokeToken");
>     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
>     curl_setopt($ch, CURLOPT_FAILONERROR, true);
>     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
>     curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization:
> AuthSub token="'.$token.'"'));
>
>     $result = curl_exec($ch);
>     curl_close($ch);
>  echo '<br>AuthSubRevokeToken= '.$result.'<br><br><br>';
>     $splitStr = split("=", $result);
>
>     //return trim($splitStr[1]);
>   }
>   function AuthSubTokenInfo($token) {
>     $ch = curl_init("https://www.google.com/accounts/
> AuthSubTokenInfo");
>     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
>     curl_setopt($ch, CURLOPT_FAILONERROR, true);
>     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
>     curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization:
> AuthSub token="' . trim($token) . '"'));
>
>     $result = curl_exec($ch);
>     curl_close($ch);
>   echo '<br>AuthSubTokenInfo= '.$result.'<br><br><br>';
>     $splitStr = split("=", $result);
>
>     return trim($splitStr[1]);
>   }
>   ?>
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "OAuth" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected] <oauth%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/oauth?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"OAuth" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/oauth?hl=en.


Reply via email to