Created
August 3, 2010 11:01
-
-
Save kbjr/506185 to your computer and use it in GitHub Desktop.
An example of using my OpenID library with CodeIgniter (http://github.com/kbjr/EasyOpenID)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//... | |
function try_auth() | |
{ | |
// load the library | |
$this->load->library('EasyOpenID'); | |
// start the request | |
$this->easyopenid | |
->provider('google') | |
->return_to('Yours/finish_auth') | |
->required(array( 'email', 'name' )) | |
->make_request(); | |
} | |
function finish_auth() | |
{ | |
// load the library | |
$this->load->library('EasyOpenID'); | |
// get the returned user data | |
$user_data = $this->easyopenid->fetch_result(); | |
// continue processing ... | |
} | |
//... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment