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.
- 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);