OpenId provider/server with Java

2019-05-06 18:06发布

问题:

I'm trying to enhance an existing Java web application with an OpenId service, so that a logged in user can log into another OpenId enabled app using my web application as an OpenId provider.

My first attempt was to use JOS as OpenId provider which should in turn use my app's database to get existing user names and passwords. Nevertheless I could not find any documentation for JOS, when I was trying to customize JOS to make it fit to my existing app (It did not even compileUpdate: It only compiles with Java 6).

At the moment I am searching for other possible solutions, but OpenId provider frameworks seem to be scarce.

What would you recommend? Using a finished server like JOS or should I consider to enhance my application by writing my own OpenId server with libraries like openid4java?

回答1:

I have not tried it myself, but my team started work on a JSF+OpenId integrated application after studying these few examples:

  • Client: IBM Example:very helpful
  • Server: IBM Example:very helpful
  • Additionally: what is OpenId and how its work
  • Also: openId API for Java

That's all I know about this, I hope it helps.



回答2:

In OpenID web site, you can find tons of options.

Couple of years ago, I've implemented this kind of project using OpenID4Java.
(Note that in your back-end you will have to connect to some repository that keeps all users/passwords - I've used OpenLDAP for that)

HTH.