Part of the EllisLab Network
x
 
Create New Page
 View Previous Changes    ( Last updated by ciscoheat )

OpenIDRpx

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

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!
        
}
    }

File:openidrpx-0.92a.zip

Forum thread: http://codeigniter.com/forums/viewthread/126012/

NOTE: The library requires PHP5 and CURL to work.