tumblr/jumblr — pull request #18 by raptortech-js (2013-05-30 02:37:41+00:00)
Title: Added automatic authentication

I added a system to automatically authenticate by calling `yourclient.authenticate()`. The method will open a browser to the tumblr authentication page and create a server to handle the redirect. The redirected page closes itself, and the `authenticate` method finishes the OAuth process before returning control to the caller. Failure is signified by a return code of `false`. Once the server starts, there is a ten minute timeout, at which point we no longer wait for the redirect and just return a failure.

To do this, I had to add `Authenticator` and `StaticServer` classes and a default response page `close_page.html`. I also had to make modifications to RequestBuilder and JumblrClient. I also made a few other changes - for example, I fixed a typo in `Post` around line 48 that caused the `getSourceTitle()` method to be commented out, and I made App.java a little more useful (I also switched it over to my authentication system). In all these changes, I tried to follow the existing style, but it's quite likely I've messed it up in places.

What do you think?