signpost

HttpURLConnection.getResponseCode() returns -1 on second invocation

I seem to be running into a peculiar problem on Android 1.5 when a library I'm using (signpost 1.1-SNAPSHOT), makes two consecutive connections to a remote server. The second connection always fails with a HttpURLConnection.getResponseCode() of -1 Here's a testcase that exposes the problem: // BROKEN public void testDefaultOAuthConsum...

Invalid OAuth Signature returned while using Yammer Api

I am trying to write a small webapp that pulls data from Yammer. I have to go through Yammer's OAuth bridge to access their data. I tried using the Oauth php library and do the 3 way handshake. But at the last step, I get an error stating I have an invalid OAuth Signature. Here are the series of steps: The first part involves getting...

OAuts with Signpost - how to sign POST to get Access token

I'm working with client who provided me with somewhat vague instructions. Here's what I'm doing (using CommonsHttpOAuthConsumer as consumer and DefaultOAuthProvider as provider) I'm able to get response token from doing this: String requestToken = provider.retrieveRequestToken (OAuth.OUT_OF_BAND); this is in form of URL with params ...

Oauth-signpost getting HTML content from provider

I am using Oauth Signpost to test our implementation of oauth I have a test that checks correct behaviour when the consumer id is incorrect, What I want to do is to check that the HTML content contains the correct error message. My question is now: How can I access the HTML content using the OAuthProvider, OAuthConsumer or Exception af...

OAuth Authentication with Evernote (Using Java+Signpost)

I'm attempting to use OAuth authentication to connect to a variety of services. For this most part, this works (tested with twitter/photobucket), but with evernote, I'm receiving a 400 response code. What's wrong here? OAuthConsumer consumer = new DefaultOAuthConsumer( "myConsumerKey", "myConsumerSecret" ); OAuthProvider provider = new...

Authenticating with Netflix: Netflix OAuth vs. SignPost OAuth: Which is correct?

With signpost 1.2: String authUrl = provider.retrieveRequestToken( consumer, callbackUrl ); Netflix API response: <status> <status_code> 400 </status_code> <message> oauth_consumer_key is missing </message> </status> I see how to craft the URL manually via the netflix documentation, but this seems to contradict othe...

Android OAuth: Exception on retrieveAccessToken().

I'm setting up OAuth for my Android app. To test it I did the following: Added signpost-core-1.2.1.1.jar and signpost-commonshttp4-1.2.1.1.jar to my project, added the variables "CommonsHttpOAuthConsumer consumer" and "CommonsHttpOAuthProvider provider" and did the following when the button is clicked: consumer = new CommonsHttpOAuthCon...

jTwitter, oAuth, and Google App Engine. NoClassDefFoundError

I'm trying to use jTwitter to get an oauth instance to twitter with my consumer key/secret and access token/secret. This is well documented in the javadoc here. I have downloaded signpost, signpost-jetty, and the jtwitter library, but after deploying and running the servlet, I get a error java.lang.NoClassDefFoundError: winterwell/jtwi...

Twitter API status update always returns "Incorrect signature"

I'm using Signpost as OAuth implementation for posting to Twitter. And implemented the GoogleAppEngineOAuthConsumer and GoogleAppEngineOAuthProvider classes, but since they're pretty trivial, so I'm not providing their sources here (yet). Here's my authentication part, which seems to work just fine. LoginServlet.java: // fetching the ...

Signpost OAuth on Android: how to re-create the Consumer between two succesive runs?

I'm succesfully using Signpost to authorize calls to protected resources in a Google account via OAuth. However it seems a bit weird that the user has to go each and every time through Google and grant access. Is there a way of serializing the Consumer and recreating it so that re-authorization is not needed? I've tried keeping the toke...

How to create a gwt.xml file for an external jar?

I have an external JAR signpost-core-1.2.1.1.jar (from http://code.google.com/p/oauth-signpost/), that I want to include into my Java GWT project. So I add this external JAR file to my build path in Eclipse and put theese imports to my Class: import oauth.signpost.basic.DefaultOAuthConsumer; import oauth.signpost.exception.OAuthCommuni...

Getting a 401 "unauthorized" when calling Google Docs API using SignPost from Android

I am able to call GET successfully and get lists of docs and spreadsheets from Google Documents List API and Spreadsheets API using OAuth with SignPost in Android. However, I have spent hours trying to make a successful POST call and keep getting a 401. I Would appreciate any hints or comments. Thanks Here is the code: //I get the secr...