6

I'm having a lot of problems trying to implement an OAuth provider.

I would like to know if anyone has successfully used an Oauth provider using Java? I found a lot of libraries but all of them are really bad commented and I cant work with them. I'm accepting any documentation that explains how an oauth provider should work and/or how implement it.

Situation: I have some data in MySQL on my server and I would like to authorize a "rely party" to access over OAuth, but I'm not sure how to do it.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Winter
  • 1,896
  • 4
  • 32
  • 41

3 Answers3

1

Here is a better alternative, It's in java and comes with demo dropwizard and Java EE applications

https://github.com/OpenConextApps/apis

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Rakesh Waghela
  • 2,227
  • 2
  • 26
  • 46
1

ApiFest is an open-source project that implements OAuth20 specification final version (RFC 6749). The project is available at github and it is released under Apache License, Version 2.0. ApiFest is written in pure Java and uses Netty as a server. You can check the code - https://github.com/apifest/apifest-oauth20. You can take a look at the documentation on the site, too - http://apifest.com.

rossa
  • 119
  • 5
1

I assume you want to secure your server-side services with Oauth? You did not say what kind of server-side technology you are using.

For example for REST-based servers, both Jersey and Resteasy already have Oauth integrated.

Also, this seem to be a pretty complete servlet+JSP OAuth example: http://oauth.googlecode.com/svn/code/java/example/oauth-provider/

ssedano
  • 8,322
  • 9
  • 60
  • 98
Peter Knego
  • 79,991
  • 11
  • 123
  • 154
  • humm i'm not sure what do i want... I have some data on mysql in my server and i want to authorize rely party to acess over oauth but i'm not sure how to do it :S – Winter Feb 20 '11 at 18:53
  • Is your rely party another site (server) or an user? – Peter Knego Feb 20 '11 at 20:05
  • Then OpenID is a better fit then OAuth. – Peter Knego Feb 20 '11 at 20:59
  • OpenID vs OAuth http://softwareas.com/oauth-openid-youre-barking-up-the-wrong-tree-if-you-think-theyre-the-same-thing – Peter Knego Feb 20 '11 at 20:59
  • the user is different than the owner of data so openid doesnt work :S and Openid only have basic type schema for data exchange – Winter Feb 20 '11 at 21:54
  • let me try to explain my ideia. have a android phone running ijetty (a container) running a server of Oauth. The rely party connects to the mobile, authenticate via Oauth and request some data from the mobile (ex:gps location) if the mobile user agrees to share he authorize for example 3 hours of access to the data. – Winter Feb 21 '11 at 10:29
  • where is `oauth-examples-parent` @PeterKnego from the example you linked? (http://oauth.googlecode.com/svn/code/java/example/oauth-provider/) looking at pom.xml – ant Dec 24 '13 at 12:30