You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Derek Jones edited this page Jul 5, 2012
·
16 revisions
OpenID sure seems promising, right? But it's a mountain of work to implement, until now. Finally a company called JanRain has released RPX, a simple solution for OpenID implementations. It can be found here: https://rpxnow.com/
This great service is free for up to 6 providers. I've made a CI library for it. When using the library, OpenID authentication becomes as easy as this (in a start controller):
functionlogin()
{
$this->load->library('openidrpx');
// In the view, display an iframe pointing to the "embedurl"$this->load->view('loginview', array('embedurl', $this->openidrpx->EmbedUrl('start/openidverify'));
}
functionopenidverify()
{
$this->load->library('openidrpx');
if($token = $this->input->post('token'))
{
$data = $this->openidrpx->AuthInfo($token);
if($id = OpenIDRpx::Identifier($data))
{
// Authorize user!
}
}
}