Sorry I don't know any working examples. It sounds like you aim to implement a client for http://oauth.googlecode.com/svn/spec/ext/consumer_request/1.0/drafts/2/spec.html It's just like the 'access a protected resource' part of 3-legged OAuth, with an empty access token and token secret. You can implement it with the net.oauth package like this:
final OAuthAccessor accessor = new OAuthAccessor(consumer); accessor.accessToken = ""; accessor.tokenSecret = ""; OAuthMessage response = client.invoke(accessor, method, serviceURL, parameters); On Sep 23, 2:27 pm, SteveM <[email protected]> wrote: > Thanks for responding, but I don't understand your response. I'm using > the oauth.googlecode.com Java client libraries today for 3-legged > OAuth and those work fine. My code looks something like this: > > final CustomOAuthService garminOAuthService = > CustomOAuthService.getInstance(); > final String serviceURL = getEndPoint() + "json/" + noun; > final CustomOAuthConsumer consumer = > customOAuthService.getCustomOAuthConsumer(); > final OAuthAccessor accessor = new OAuthAccessor(consumer); > if (accessToken != null) { > accessor.accessToken = accessToken.getToken(); > accessor.tokenSecret = accessToken.getTokenSecret(); > } > Set<Map.Entry> entrySet = null; > if (params != null) { > entrySet = params.entrySet(); > } > OAuthMessage result = CLIENT.invoke(accessor, method, > serviceURL, entrySet); > > From what I can see the OAuthAccessor is only capable of doing 3- > legged OAuth. I'm looking for and example of how to use the > oauth.googlecode.com Java libraries to do 2-legged AOuth. If I saw a > working example I could adapt it to my uses. -- 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.
