title: How to single sign on into gmail, yahoo mail & facebook from Spring based Web application with ldap as Authentication provider
body: <p>We have a Spring <code>MVC</code> &amp; <code>JSF</code> based web application which uses <code>Spring</code> security to do user Authentication using LDAP provider &amp; after successful authentication user profile is fetched from oracle database. </p>
  
  <p>Now I need to integrate facebook, gmail &amp; yahoo mail with this application. </p>
  
  <p>The expected behavior is after doing the login into this web application the user should automatically be logged in into facebook , gmail &amp; yahoo mail as well. The user profile in the oracle database will contain the login id of gmail, facebook &amp; yahoo mail. </p>
  
  <p>The menu in the application will contain links for gmail, yahoo mail l &amp; facebook &amp; while user will click on those menu the corresponding site will open as logged in for that user in a iframe without asking user id &amp; password of that website. It is good if password of gmail, yahoo mail &amp; facebook account of the users are not needed to keep into database. Please let me know if there is any way to achieve this.</p>
  
  <p>I started thinking to use <code>OAuth2</code>, but don't know whether that is right way to go forward or not. Please help me with some relevant single sign on solution to solve this.</p>
  
  <p><em>[Note: Web application uses Java 6, Tomcat 6, jsf as FE &amp; hibernate as ORM &amp; Spring MVC &amp; Spring security framework for security]</em></p>