jumblr icon indicating copy to clipboard operation
jumblr copied to clipboard

Added automatic authentication

Open jackie-scholl opened this issue 11 years ago • 1 comments

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?

jackie-scholl avatar May 30 '13 02:05 jackie-scholl

Is this likely to be implemented anytime soon? I'm not an expert at authentication and having something like this which does the majority of the work in the way authentication, would significantly simplify development of my app. It's surely worthwhile including as it's surely something that's going to be repeatedly used by nearly anything that uses the Jumblr library?

jay-to-the-dee avatar May 09 '14 21:05 jay-to-the-dee