I am lost in all my open browser tabs for Google single sign on 🙂
I already have an application which I would like to put on Google market place. And mandatory integration is Google SSO. I have built application on Struts2 with Spring.
So now I need some instructions how to make this integration. An example would be perfect. Or how to start, which technology to use, best approaches, anything similar…
Also, do I have to use Google App Engine for SSO integration or no? Honestly, I am confused 🙂
EDIT
I started here: developers.google.com/google-apps/marketplace/sso Because I use Java, if you look at Getting started at the bottom, I wanted to use step2, but the link is dead. From there on I got stuck…
Links here are also dead.
I made with Apache’s HttpClient. This is my solution and works perfectly for me.
First point to authorization url:
https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/userinfo.profile+https://www.googleapis.com/auth/userinfo.email&state=%2Fprofile&response_type=code&client_id=<YOUR_CLIENT_ID>&redirect_uri=<YOUR_CALLBACK_URL>Then get parameters back from your
redirect_uriand build request body for gettingaccess_token:Then with HttpClient make a POST and with simple JSON parser parse out the access token.
Now you have the access token and you can now access all of the Google API. For example, getting all the users info:
This data you can now save and use it for login to your application.