title: Implementing SSO and Spring Security for SAAS
body: <p>Here is what we want at high level.</p>
  
  <p><img src="https://i.stack.imgur.com/pzEjA.jpg" alt="enter image description here"></p>
  
  <p>My Requirements,</p>
  
  <ol>
  <li><p>Clients should be able to access my application using their <strong>existing</strong> username/password.</p></li>
  <li><p>My clients should be able to provide me their user-roles, and based upon that I will manage the resource authorization in the server.</p></li>
  <li><p>Client will share the database. (Multitenancy).</p></li>
  </ol>
  
  <p>The OAuth 2.0 examples I went across are, utilizing Authentication Servers such as Facebook/Google, where in users can login thru their google or facebook account. 
  I wan't my clients to be able to login with their own accounts.</p>
  
  <p>As far as CAS Authentication server is concerned it directs the user to its own login page.</p>
  
  <p>I am looking for a standard way, where in I can use spring security and allow my clients to single sign on user their own credentials. Any references will be of great help. Thank you.</p>