JOAuth (OAuth for Java)

I finally contributed something out there. Introducing JOAuth, a java library that OAuth authorization version 1 and version 2 (draft 5).

OAuth (which is an abbreviated name for Open Authorization) is an open standard for authorization. It is an open protocol for authorization. What that means is, an end-user (you) can share your private resources (emails, photos, music) stored in 1 service provider (e.g. Facebook) to another service provider (e.g. Twitter) without sharing your very important credentials (your username and password).

I won't go through the technicalities of OAuth (as there are various sites such as OAuth.net documentation site) but for java, there were very few OAuth 1 library, as listed on OAuth Code section. As for OAuth 2, there are none, seeing that OAuth 2 is on draft stage (draft 10 by the time of writing). For this, I decided to implement OAuth 1 and 2.

The reason behind this madness (yes, madness... I don't really like downloading other developer's jar files unless I'm too lazy to write my own or my boss is about to scream in my ear for the *I lost count*th time) came from the fact that I was writing my own interpretation of the Facebook API (version 1 before Graph API came out) and Twitter (when they still had Basic Authorization) and Twitter used OAuth 1 (which I completed last year). Fast forward to 3 months ago, I see Facebook Graph API came out and used OAuth 2 (draft 0 at that time) and Twitter restructured their API to OAuth 1. There was still no API for OAuth 2 in java, so I took on the challenge and within a week I was done. I was using draft 5 of OAuth 2.

Now, the little library isn't a servlet to do your request/access token sending back and forth, it's just a helper to request/retrieve request and access tokens through HTTP. Your redirecting, unfortunately, you have to do it on your own.

To download the jar and source code, feel free to go to JOAuth on Google Code.

Comments

  1. Cool, but are you going to maintain the library going forward?

    ReplyDelete
  2. I have to, that's the whole idea about sharing codes. :-)

    ReplyDelete
  3. Is there a place I can ask questions about using this library?

    ReplyDelete
  4. Yes Julius, you can ask on StackOverflow.com (like others) or via email.

    ReplyDelete

Post a Comment