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.
$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->message); // [ 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->addToOpenIDResponse($openid_response);
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);
| 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. |
Import message and extension internals.
Check to see that the given value is a valid simple registration data field name. Return true if so, false if not.
Convenience function for copying all the sreg data that was requested from a supplied set of sreg data into the response message. If no data were requested, no data will be sent.
openid_request: The OpenID (checkid_*) request that may be requesting sreg data.
data: The simple registration data to send. All requested fields that are present in this dictionary will be added to the response message.
openid_response: The OpenID C{id_res} response to which the simple registration data should be added
Does not return a value; updates the openid_response instead.
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
Documentation generated on Mon, 10 Sep 2007 13:34:43 -0700 by phpDocumentor 1.3.2