Skip to content
World Wide Web Server edited this page Jul 4, 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: [url]https://rpxnow.com/[/url]

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):

[code] function login() { $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'));

}

function openidverify() { $this->load->library('openidrpx');

if($token = $this->input->post('token'))
{
    $data = $this->openidrpx->AuthInfo($token);
    
    if($id = OpenIDRpx::Identifier($data))
    {
         // Authorize user!
    }
}

} [/code]

File:openidrpx-0.91.zip

Forum thread: [url]http://codeigniter.com/forums/viewthread/126012/[/url]

[i]NOTE: The library requires CURL to work.[/i]

Clone this wiki locally