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.
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.
My website is built on LAMP and I am using ZEND framework
This is a skeleton structure of how I am planning to do
1) On the college website, as part of the iframe code - they will call one of my action classes and pass the user email
<iframe src="http://mywebsite/user/validate/email/alice@gcc.com"></iframe>
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
$currentUser = $userModel->loadUserProfileByEmail($this->_getParam('email'));
$auth = Zend_Auth::getInstance();
$storage = $auth->getStorage();
$storage->write($currentUser);
return $this->_redirect('/user/my-courses/');
This is what I have so far - and obviously it works
My Questions
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.
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.
Any advice or suggestions will be appreciated Thanks