and if I am reading this right, it looks like the oauth client library
is passing in a timestamp of:

  1266530170

while the server is saying it must be between:

  1266519077-1266519677

to be acceptable. This is confusing to me, I'm not sure where I would
fix this, is that a problem with the server, or my client usage of the
oauth library?

Thanks

On Feb 18, 11:05 am, dj <[email protected]> wrote:
> Hi Robert,
>
> Thanks for the information. I do get some information printed from the
> caught OAuthProblemException. It is printed below. Looks like
> something related to the timestamp being refused? I tried searching
> for the timestamp refused error, and it seems like you're supposed to
> be setting the current time in the oauth client somehow, I don't know
> if that's true, or if it is, where would we do that?:
>
> HTTP response: HTTP/1.1 400 Bad Request
> Server: nginx/0.7.64
> Date: Thu, 18 Feb 2010 18:56:17 GMT
> Content-Type: text/plain; charset=utf-8
> Connection: keep-alive
> Content-Length: 70
> X-Lift-Version: 2.0-M2
>
> TIMESTAMP_REFUSED (oauth_acceptable_timestamps: 1266519077-1266519677)
> URL:http://thesite.com/oauth/request_token?oauth_consumer_key=xxxxx&oauth...
> HTTP request: GET /oauth/request_token?
> oauth_consumer_key=xxxxx&oauth_signature_method=HMAC-
> SHA1&oauth_timestamp=1266530170&oauth_nonce=71507272567&oauth_version=1.0&o 
> auth_signature=ulBLMuMJP
> +e0a8M9d2WM6HruDa0=
>
> Thanks
>
> On Feb 16, 3:09 pm, Robert Winch <[email protected]> wrote:
>
>
>
> > According to the OAuth spec a 400 occurs when a Service Provider rejects a
> > Consumer Request. Some of the examples they outline are Unsupported
> > parameter, Unsupported signature method, Missing required parameter, ...
> > Since the code is working against another provider I'd consult the doc for
> > this specific provider to see what they expect (i.e. maybe they only support
> > PLAINTEXT signatures). If the service provider sends error info back in the
> > response, you can change your code as follows to get some additional data.
>
> > try {
> >   client.getRequestToken(accessor);}catch(OAuthProblemException e) {
>
> >   System.err.println(e.getParameters());
> >   throw e;
>
> > }
>
> > HTH,
> > Rob
>
> > On Tue, Feb 16, 2010 at 4:25 PM, dj <[email protected]> wrote:
> > > Hi,
>
> > > I'm trying to use oauth on Android, going along with this excellent
> > > tutorial on how to do it:
>
> > >  http://donpark.org/blog/2009/01/24/android-client-side-oauth
>
> > > it works for twitter. Now I just replaced the urls, key and secret, to
> > > point to a different third party OAuth service I want to use. I get
> > > the following exception thrown:
>
> > > net.oauth.OAuthProblemException: HTTP/1.1 400 Bad Request
> > >  at net.oauth.client.OAuthClient.invoke(OAuthClient.java:257)
> > >  at net.oauth.client.OAuthClient.invoke(OAuthClient.java:160)
> > >  at net.oauth.client.OAuthClient.getRequestToken(OAuthClient.java:
> > > 101)
> > >  at net.oauth.client.OAuthClient.getRequestToken(OAuthClient.java:77)
> > >  at net.oauth.client.OAuthClient.getRequestToken(OAuthClient.java:
> > > 110)
>
> > > Here's the code I'm using:
>
> > > OAuthServiceProvider provider = new OAuthServiceProvider(
> > >  urlRequestToken,
> > >  urlAccessToken,
> > >  urlAuthorize);
>
> > > OAuthConsumer consumer = new OAuthConsumer(
> > >  urlCallback,
> > >  consumerKey,
> > >  consumerSecret, provider);
> > > OAuthAccessor accessor = new OAuthAccessor(consumer);
> > > OAuthClient client = new OAuthClient(new HttpClient4());
>
> > > // Exception:
> > > client.getRequestToken(accessor);
>
> > > I'm sure my key and secret are correct, and my urls are pointing to
> > > the correct locations. Is the third party implementation of OAuth
> > > (server-side) the cause of this? It is working for twitter and linked-
> > > in. Any ideas would be great,
>
> > > Thanks
>
> > > --
> > > 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