As John pointed out you should not set the accessToken to "" you should
leave it null. I believe if you change this it will fix your problem. Two
legged OAuth does not specify the access token on the request (since access
token is never requested) [1]. I think the error you are seeing occurs since
the accessToken is specified (as empty string) and it was never given to you
by the SP.

HTH,
Rob

[1]
http://oauth.googlecode.com/svn/spec/ext/consumer_request/1.0/drafts/1/spec.html

On Thu, Oct 15, 2009 at 5:43 AM, Anuradha Thota <[email protected]>wrote:

>
> Iam using 2 legged approach . i am getting the below exception
> net.oauth.OAuthProblemException: token_expired when i use the below
> validation code
>
> OAuthMessage requestMessage = OAuthServlet.getMessage(request, null);
> OAuthAccessor accessor = SampleOAuthProvider.getAccessor
> (requestMessage);
> SampleOAuthProvider.VALIDATOR.validateMessage(requestMessage,
>                                        accessor);
> Any help on this please?
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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