title: How to authenticate 3rd party website via iframe call
body: <p>I'm working with a college and need to integrate my courses - so their students can access it on the college website. We are going with the simple iframe integration. </p>
  
  <p>The user is going to register on the college website and they will pass the user information to me so I can start a session and give access to the course pages on my website which through iframe they will show on theirs.</p>
  
  <p>My website is built on LAMP and I am using ZEND framework</p>
  
  <p>This is a skeleton structure of how I am planning to do</p>
  
  <p>1) On the college website, as part of the iframe code - they will call one of my action classes and pass the user email</p>
  
  <pre><code>&lt;iframe src="http://mywebsite/user/validate/email/alice@gcc.com"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>2) Now in User controller - validate Action - I will basically check if user does not exist - create a new user or load an existing user with his email and start a Zend Auth instance and write the user to storage and redirect to his course page as shown below</p>
  
  <pre><code>$currentUser = $userModel-&gt;loadUserProfileByEmail($this-&gt;_getParam('email'));
  $auth = Zend_Auth::getInstance();
  $storage = $auth-&gt;getStorage();         
  $storage-&gt;write($currentUser);
  return $this-&gt;_redirect('/user/my-courses/');
  </code></pre>
  
  <p>This is what I have so far - and obviously it works</p>
  
  <p>My Questions</p>
  
  <p>1) Is this the best way to do this. I wont have the user's password because the authentication happens on college website and they dont want the user to directly login on my website.</p>
  
  <p>2) This is the big question. I'm little confused about the best way to authenticate that this call is being made by this particular college. How do I go about this - do they pass a encrypted token along with this iframe call - and only I have the key to decrypt it - I've not done this - I dont know if I'm over complicating something simple.</p>
  
  <p>Any advice or suggestions will be appreciated
  Thanks</p>