rohtimi / oauth-php

Automatically exported from code.google.com/p/oauth-php
MIT License
0 stars 0 forks source link

parameter_absent oauth_parameters_absent:scope #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
> 1. refer to the code, http://docs.google.com/Doc?id=dcs6v3h8_20grb3k8gr

What is the expected output? What do you see instead?
> The page should redirect to authorization page, But I've got a 400 error
HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=UTF-8
Date: Mon, 08 Sep 2008 06:14:30 GMT
Expires: Mon, 08 Sep 2008 06:14:30 GMT
Cache-Control: private, max-age=0
Content-Length: 48
Server: GFE/1.3

parameter_absent
oauth_parameters_absent:scope

What version of the product are you using? On what operating system?
>oauth-php-r17

Please provide any additional information below.

Original issue reported on code.google.com by plai...@gmail.com on 8 Sep 2008 at 6:15

GoogleCodeExporter commented 9 years ago
Hello plainwu,

I understand that you want to talk to the Google Data API using the OAuth-php 
library?    Google requires a 
'scope' parameter for the request_token uri.   Which uris did you configure?

I've found this documentation mentioning the 'scope' parameter:

http://code.google.com/apis/accounts/docs/OAuth.html

An issue you will run into is that Google only supports RSA-SHA1 hashes.  At 
the moment we don't support 
this signature method (due to key management issues).  Currently we support 
PLAINTEXT, HMAC-SHA1 and 
MD5.

- Marc

Original comment by ma...@pobox.com on 8 Sep 2008 at 8:49

GoogleCodeExporter commented 9 years ago
ok... thanks for your reply

Original comment by plai...@gmail.com on 9 Sep 2008 at 7:33

GoogleCodeExporter commented 9 years ago
We are refactoring the library so that it will be possible to use it with 
RSA-SHA1.  Refactoring is necessary as the 
signing with RSA-SHA1 requires a different signature verification flow.

Original comment by ma...@pobox.com on 9 Sep 2008 at 8:22

GoogleCodeExporter commented 9 years ago
That's a great news....

Look forward to your next release...

Original comment by plai...@gmail.com on 9 Sep 2008 at 10:56

GoogleCodeExporter commented 9 years ago
I just added code to support RSA-SHA1 signing.
This very alpha quality and needs some testing.

For now you can check:

http://code.google.com/p/oauth-
php/source/browse/trunk/library/signature_method/OAuthSignatureMethod_RSA_SHA1.p
hp

Original comment by ma...@pobox.com on 1 Oct 2008 at 3:14

GoogleCodeExporter commented 9 years ago
I consider this bug as fixed, as we do support RSA-SHA1 code signing now.

Original comment by ma...@pobox.com on 25 Jan 2009 at 11:22

GoogleCodeExporter commented 9 years ago
Hi I am writing c# .net application to test OAuth and I am getting 
parameter_absent oauth_parameters_absent:scope Error

Please help. Here is my code

            UnityContainer unityContainer = new UnityContainer();

            UnityConfigurationSection section = (UnityConfigurationSection)ConfigurationManager.GetSection("oauth.net.consumer");

            section.Containers.Default.Configure(unityContainer);

            ServiceLocator.SetLocatorProvider(() => new UnityServiceLocator(unityContainer));

            OAuthConsumer oAuthConsumer = new OAuthConsumer("anonymous", "anonymous", "My Application");
            IServiceLocator serviceLocator = ServiceLocator.Current;
            OAuthService oAuthService = OAuthService.Create(new EndPoint("https://www.google.com/accounts/OAuthGetRequestToken"), new Uri("https://www.google.com/accounts/OAuthAuthorizeToken"), new EndPoint("https://www.google.com/accounts/OAuthGetAccessToken"), oAuthConsumer);
            OAuthRequest oAuthRequest = OAuthRequest.Create(new EndPoint("https://www.google.com/calendar/feeds/default/private/full"), oAuthService);

            OAuthResponse oAuthResponse = oAuthRequest.GetResource(); // Here I am getting error

Here is my App.config file

<configuration>
  <configSections>
    <section name="oauth.net.consumer" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration"/>
  </configSections>
  <oauth.net.consumer>
    <containers>
      <container>
        <types>
          <type type="OAuth.Net.Common.ISigningProvider, OAuth.Net.Common"
                 mapTo="OAuth.Net.Components.HmacSha1SigningProvider, OAuth.Net.Components"></type>
          <type type="OAuth.Net.Common.INonceProvider, OAuth.Net.Common"
                     mapTo="OAuth.Net.Components.GuidNonceProvider, OAuth.Net.Components" />
        </types>
      </container>
    </containers>
  </oauth.net.consumer>
</configuration>

Original comment by na.sage...@gmail.com on 7 Jan 2011 at 6:24