views:

2182

answers:

6
+14  Q: 

OpenID Java

Is there an openID implementation in Java? I would like to use this in a tomcat application.

+12  A: 

openid4java

Adam Mika
+8  A: 

The only one I have looked into is OpenID4Java by there is are more options listed on at http://wiki.openid.net/Libraries.

I recommend looking at Using OpenID on TheServerSide.COM for a good introduction with some valuable code snippets.

At the moment I am leaning towards implementing the authentication and authorization in the web tier using mod_auth_openid. But still make my application an authentication provider for people who don't want to know they are using OpenID.

bmatthews68
+2  A: 

If you don't mind using a service there is RPX

ltd
RPX saved me!! I struggled for days to implement all of the features necessary to get OpenID to work. In the end I still couldn't get it to work. I'm using RPX now and it only took a few hours to get up and running.
Trevor Allred
+4  A: 

Spring Security provides an OpenID authentication method too

Thomas Einwaller
+1  A: 

I am currently using Openid4Java in a Grails application in Tomcat and it works quite well. There's a few issues with the (very old) binary that is on the download site code.sxip.com, namely that it doesn't work at all with Yahoo or myopenid.com implementations. If you want to use it you can find a binary on the projects Google groups, or get the source code from the Subversion repository and built it from there. It's quite trivial, basically just an ant script you need to run.

stian
Another issue I ran into was that I needed to setEnforceRpId(false) on the ConsumerManager to make it work when developing on localhost.
stian
+2  A: 

I've been searching for this myself as well. Here are my findings:

  • OpenId4Java does not run on Google App Engine. It spawns new threads
  • JOpenId does not do discovery and I have some doubts it is does DH-1 or DH-256 to establish an association.

I have not found a general java openid 2.0 provider yet that I can use on GAE.

Sentient