title: How to do authentication using LDAP, Application, Third Party application etc
body: <p>We will be creating a web application in java. </p>
  
  <p>For User Authentication currently we are using LDAP. But we want to have some other options like application level authentication (from database) , gmail, facebook etc. </p>
  
  <p>Somewhat similar to what stack overflow has on login page. </p>
  
  <p>We will be maintaining a properties file which will consist of all the available options for authentication like LDAP, facebook, gmail etc. </p>
  
  <p>If we want to add one more authentication service we will add it in this properties file and then we will need to add helper file which will do the actual work of doing the authentication.</p>
  
  <p>This should be highly customizable.</p>
  
  <p>I have following questions regarding this, </p>
  
  <p>1) What is the best way to go about this?
  2) How to do third party authentication like google, facebook etc?</p>
  
  <p>PS: When we do the authentication using gmail etc, we will need some basic information back to our application which we can use. </p>