/Auth/OpenID/SReg.php

Description

Simple registration request and response parsing and object representation.

This module contains objects representing simple registration requests and responses that can be used with both OpenID relying parties and OpenID providers.

  1. The relying party creates a request object and adds it to the Auth_OpenID_AuthRequest object before making the
checkid request to the OpenID provider:

$sreg_req = Auth_OpenID_SRegRequest::build(array('email')); $auth_request->addExtension($sreg_req);

2. The OpenID provider extracts the simple registration request from the OpenID request using Auth_OpenID_SRegRequest::fromOpenIDRequest, gets the user's approval and data, creates an Auth_OpenID_SRegResponse object and adds it to the id_res response:

$sreg_req = Auth_OpenID_SRegRequest::fromOpenIDRequest( $checkid_request); // [ get the user's approval and data, informing the user that // the fields in sreg_response were requested ] $sreg_resp = Auth_OpenID_SRegResponse::extractResponse( $sreg_req, $user_data); $sreg_resp->toMessage($openid_response->fields);

3. The relying party uses Auth_OpenID_SRegResponse::fromSuccessResponse to extract the data from the OpenID response:

$sreg_resp = Auth_OpenID_SRegResponse::fromSuccessResponse( $success_response);

Classes
Class Description
Auth_OpenID_SRegBase A base class for classes dealing with Simple Registration protocol messages.
Auth_OpenID_SRegRequest An object to hold the state of a simple registration request.
Auth_OpenID_SRegResponse Represents the data returned in a simple registration response inside of an OpenID C{id_res} response. This object will be created by the OpenID server, added to the C{id_res} response object, and then extracted from the C{id_res} message by the Consumer.
Includes
require_once ('Auth/OpenID/Message.php') (line 45)

Import message and extension internals.

require_once ('Auth/OpenID/Extension.php') (line 46)
Constants
Auth_OpenID_SREG_NS_URI = Auth_OpenID_SREG_NS_URI_1_1 (line 86)
Auth_OpenID_SREG_NS_URI_1_0 = 'http://openid.net/sreg/1.0' (line 77)
Auth_OpenID_SREG_NS_URI_1_1 = 'http://openid.net/extensions/sreg/1.1' (line 81)
Functions
Auth_OpenID_checkFieldName (line 65)

Check to see that the given value is a valid simple registration data field name. Return true if so, false if not.

void Auth_OpenID_checkFieldName ( $field_name)
  • $field_name
Auth_OpenID_supportsSReg (line 97)

Does the given endpoint advertise support for simple registration?

$endpoint: The endpoint object as returned by OpenID discovery. returns whether an sreg type was advertised by the endpoint

void Auth_OpenID_supportsSReg ( &$endpoint)
  • &$endpoint

Documentation generated on Tue, 09 Sep 2008 12:12:27 -0700 by phpDocumentor 1.3.2