Search code examples
javastruts2openidgoogle-openid

OpenId authentication in struts 2 web application


This is related to OpenId authentication. I have implemented the google and yahoo openId auth with java in struts2 but it is achieved through page redirection to openId provider auth page and then back to my own success web-page. But what i wanted was same as facebook auth. were in json object is passed from fb and fb authentication is done in a pop-up. so that redirection can be avoided. Plz help me out.

I have somewhat implemented which is mentioned in this post part1-part4: http://javadeveloperjournal.blogspot.in/2011/08/integrating-openid-into-my-struts-2-app.html


Solution

  • First, i will not suggest to use OpenID for Facebook and Facebook do not provides its own implementation for the OpenID but rely on certain third party implimentations.

    Best way to go with OAuth which is quite similar to what OpenID is with only differences in the level of security and authentication.

    While Constructing a URL to the OAuth Dialog, you can specify a parameter namely display indicating if you want a page redirect or pop-up, by default the value of this parameter is set to page

    Please go through Facebook documentation for implementing OAuth

    oauth using Facebook