33

What is the fastest/easiest way to get an OAuth provider running in Java? Specifically, I need to authorize third-party apps to access certain web services (I'm thinking token authentication using OAuth).

I've been looking at Jersey's OAuth extension, but as mentioned here, it doesn't provide a full-fledged Service Provider.

1 Answer 1

26

There are a few Java libraries out there for OAuth. Specifically, I'd have a look at this one. I haven't used it myself, but there is an example for running an OAuth Service Provider.

There's a list of libraries available on the OAuth website: http://oauth.net/code

Sign up to request clarification or add additional context in comments.

3 Comments

I did eventually go for the net.oauth Java package. The net.oauth.example.provider was pretty useful. I also came across the Spring's OAuth tutorial: spring-security-oauth.codehaus.org/tutorial.html. But since I'm not running Spring, it wasn't very useful for me.
Since so many people have viewed this, I just want to add that I took the example servlets in net.oauth.example.provider.servlets to handle OAuth (barely modified). oauth.googlecode.com/svn/code/java/example/oauth-provider The JavaScript client helped a lot to test my implementation. oauth.googlecode.com/svn/code/javascript For protected resources, just make sure you validate the OAuthAccessor.
@Paul the above link [this one]oauth.googlecode.com/svn/code/java/core is broken

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.