Support Joomla!

Packages

Package: OpenID

License

Content on this site is copyright © 2005 - 2008 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.

File/openid/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
 class Auth_OpenID_SRegBase A base class for classes dealing with Simple Registration protocol messages.
 class Auth_OpenID_SRegRequest An object to hold the state of a simple registration request.
 class 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 48)

Import message and extension internals.

 require_once ('Auth/OpenID/Extension.php') (line 49)
Constants
Auth_OpenID_SREG_NS_URI = Auth_OpenID_SREG_NS_URI_1_1 (line 89)
Auth_OpenID_SREG_NS_URI_1_0 = 'http://openid.net/sreg/1.0' (line 80)
Auth_OpenID_SREG_NS_URI_1_1 = 'http://openid.net/extensions/sreg/1.1' (line 84)
Functions
Auth_OpenID_checkFieldName (line 68)

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 100)

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 Sat, 14 Nov 2009 11:20:46 +0000 by phpDocumentor 1.3.1