title: Login with Facebook and Twitter using Spring Social
body: <p>I have a simple web-application where users can login and perform some simple task. I created the project as a hobby. I want to add Login with Facebook and Twitter using Spring Social to the existing login feature. </p>
  
  <p>I am using hibernate and my Users table have the following fields : 
  username, password (encrypted), uuid, email, enabled and authority. </p>
  
  <p>I looked up the process online and because of the continually changing Spring Social, the examples vary a lot and I am getting confused. </p>
  
  <p>Can anybody explain in simpler terms what are the basic components necessary and how they all tie up if you use spring social? </p>
  
  <ol>
  <li><p>In most examples there is a UserDetails class to represent my users. There is also a separate "Users" bean. Why are there two different classes? Can we not do away with one.</p></li>
  <li><p>I already have a Dao class for persistence. Can I re-use it? I guess another way of asking these questions would be to ask what interfaces from spring social should I implement?</p></li>
  <li><p>I am a spring n00b (to the extent that this was the first time I came across annotation based configs. I have only used xml based config). Which one is chosen where and why?</p></li>
  <li><p>ProviderSignInController - I believe this makes a request and gets the data. </p></li>
  <li><p>Connections? What are they where do these connections exist? </p></li>
  </ol>
  
  <p>I am using spring 3.2.4 and Spring-Social 1.1.0. I have seen examples from both 1.0.3 and 1.1.0. </p>
  
  <p>I will research more, but I need some good pointers to begin with.</p>