title: Single Sign on Authentication with CAS
body: <p>I am trying to implement single sign-on authentication between two of my applications one in PHP and the other in .NET. The PHP site currently makes a Web Service call to a .NET Web method to authenticate the user. Both the .NET site and the PHP site use the same database. I was inclined to think I could implement a single sign on mechanism where if the user logs in to the php site he is automatically authenticated to the .net site as well. CAS authentication seems to be somewhat relevant to my case. But I am not sure where it exactly fits between my applications. So let me break it down into distinct steps please let me know if I am right?</p>
  
  <ol>
  <li><p>User visits www.myphpsite.com/login</p></li>
  <li><p>He supplies the username and password and clicks on the login button.</p></li>
  <li><p>A web service call is then made to the .NET web method hosted in the same server as my .NET application www.myDotNetApp.com</p></li>
  <li><p>The Web service uses the database to authenticate the user.</p></li>
  <li><p>Somewhere here CAS has to fit in and has to ensure that I am authenticated for both  www..com and www.myDotNetApp.com. In addition to doing this it has to set some session variables for the www..com site for the user to be able to view the different pages in the site.</p></li>
  <li><p>Then the Web method has to redirect the user to the homepage in the www.myphpsite.com.</p></li>
  <li><p>Now if the user clicks the link to www.myDotNetApp.com from  www.myphpsite.com he must be taken to his profile page in www.myDotNetApp.com because he is already authenticated.</p></li>
  </ol>
  
  <p>Now, is it possible to achieve this? If so, how?</p>