Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Ran into the same issue. Some digging in AX.php got me a working start. Haven't looked for any bugs, nor tested beyond basic, nor tested with anyone other than Google. This is not pretty: needs error handling, etc. But this should get you started. Will post an update if I have something robust... </p> <p><strong>First to throw ...</strong> <pre><code>// oid_request.php // Just tested this with/for Google, needs trying with others ... $oid_identifier = 'https://www.google.com/accounts/o8/id'; // Includes required files require_once "Auth/OpenID/Consumer.php"; require_once "Auth/OpenID/FileStore.php"; require_once "Auth/OpenID/AX.php"; // Starts session (needed for YADIS) session_start(); // Create file storage area for OpenID data $store = new Auth_OpenID_FileStore('./oid_store'); // Create OpenID consumer $consumer = new Auth_OpenID_Consumer($store); // Create an authentication request to the OpenID provider $auth = $consumer-&gt;begin($oid_identifier); // Create attribute request object // See http://code.google.com/apis/accounts/docs/OpenID.html#Parameters for parameters // Usage: make($type_uri, $count=1, $required=false, $alias=null) $attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/contact/email',2,1, 'email'); $attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/namePerson/first',1,1, 'firstname'); $attribute[] = Auth_OpenID_AX_AttrInfo::make('http://axschema.org/namePerson/last',1,1, 'lastname'); // Create AX fetch request $ax = new Auth_OpenID_AX_FetchRequest; // Add attributes to AX fetch request foreach($attribute as $attr){ $ax-&gt;add($attr); } // Add AX fetch request to authentication request $auth-&gt;addExtension($ax); // Redirect to OpenID provider for authentication $url = $auth-&gt;redirectURL('http://localhost:4001', 'http://localhost:4001/oid_catch.php'); header('Location: ' . $url); </code></pre> <p><strong>... and then to catch</strong></p> <pre><code>&lt;?php // oid_catch.php // Includes required files require_once "Auth/OpenID/Consumer.php"; require_once "Auth/OpenID/FileStore.php"; require_once "Auth/OpenID/AX.php"; // Starts session (needed for YADIS) session_start(); // Create file storage area for OpenID data $store = new Auth_OpenID_FileStore('./oid_store'); // Create OpenID consumer $consumer = new Auth_OpenID_Consumer($store); // Create an authentication request to the OpenID provider $auth = $consumer-&gt;complete('http://localhost:4001/oid_catch.php'); if ($response-&gt;status == Auth_OpenID_SUCCESS) { // Get registration informations $ax = new Auth_OpenID_AX_FetchResponse(); $obj = $ax-&gt;fromSuccessResponse($response); // Print me raw echo '&lt;pre&gt;'; print_r($obj-&gt;data); echo '&lt;/pre&gt;'; exit; } else { // Failed } </code></pre> <p>Those ought to be the basics...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload