OpenID Sample Code for Dolphin

OpenID sample Code, please expert guys share Smile

code below:

<?php

// Below is a very simple PHP 5 script that implements the RPX token URL processing.
// The code below assumes you have the CURL HTTP fetching library.

$rpxApiKey = 'REPLACE_WITH_YOUR_RPX_API_KEY';

if(isset($_POST['token'])) {

/* STEP 1: Extract token POST parameter */
$token = $_POST['token'];

/* STEP 2: Use the token to make the auth_info API call */
$post_data = array('token' => $_POST['token'],
'apiKey' => $rpxApiKey,
'format' => 'json');

$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_URL, 'https://rpxnow.com/api/v2/auth_info');
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$raw_js alt= curl_exec($curl);
curl_close($curl);


/* STEP 3: Parse the JSON auth_info response */
$auth_info = json_decode($raw_json, true);

if ($auth_info['stat'] == 'ok') {

/* STEP 3 Continued: Extract the 'identifier' from the response */
$profile = $auth_info['profile'];
$identifier = $profile['identifier'];

if (isset($profile['photo'])) {
$photo_url = $profile['photo'];
}

if (isset($profile['displayName'])) {
$name = $profile['displayName'];
}

if (isset($profile['email'])) {
$email = $profile['email'];
}

/* STEP 4: Use the identifier as the unique key to sign the user into your system.
This will depend on your website implementation, and you should add your own
code here.
*/

any body knows what code should we put here for D7?

/* an error occurred */
} else {
// gracefully handle the error. Hook this into your native error handling system.
echo 'An error occured: ' . $auth_info['err']['msg'];
}
}
?>

/* END */

Thanks in advance

Quote · 26 May 2010

Just use the code from PHP experts - http://www.boonex.com/unity/extensions/entry/Open_ID_connect

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 8 Jun 2010

or just wait and take the code from dolphin 7.0.2     or get the code now from svn.

https://dolphin-techs.com - Skype: Dolphin Techs
Quote · 11 Jun 2010

 

or just wait and take the code from dolphin 7.0.2     or get the code now from svn.

 

Does 7.0.2 include this? It isn't listed in the patch & I don't see it in trac source.

Do you have a URL to this file dolphin_jay?

Thanks : )

Quote · 18 Jun 2010

Dolphin not contain official OpenID module now!

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 23 Jun 2010

It was in the svn. I seen it a while back.  ill have to dig over the files again.

And sashaE can you remove your link. This is a code sharing forum only. Not spam my products for dolphin Forum. if you want to share the code in your mod then by all means do so.

https://dolphin-techs.com - Skype: Dolphin Techs
Quote · 25 Jun 2010

hi folks,

what is the situation now, is it possible to connect using openID ?

i need to bridge dolphion to smf forum for convienience, any tips and advices welcome!

thxxxx

Quote · 6 Aug 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.