ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
Auth_OpenID_SRegResponse Class Reference
+ Inheritance diagram for Auth_OpenID_SRegResponse:
+ Collaboration diagram for Auth_OpenID_SRegResponse:

Public Member Functions

 Auth_OpenID_SRegResponse ($data=null, $sreg_ns_uri=Auth_OpenID_SREG_NS_URI)
 getExtensionArgs ()
 Get the string arguments that should be added to an OpenID message for this extension.
 get ($field_name, $default=null)
 contents ()

Static Public Member Functions

static extractResponse ($request, $data)
 Take a C{L{SRegRequest}} and a dictionary of simple registration values and create a C{L{SRegResponse}} object containing that data.
static fromSuccessResponse ($success_response, $signed_only=true)
 Create a C{L{SRegResponse}} object from a successful OpenID library response (C{L{openid.consumer.consumer.SuccessResponse}}) response message.
- Static Public Member Functions inherited from Auth_OpenID_SRegBase
static _getSRegNS ($message)
 Extract the simple registration namespace URI from the given OpenID message.

Data Fields

 $ns_alias = 'sreg'

Detailed Description

Definition at line 417 of file SReg.php.

Member Function Documentation

Auth_OpenID_SRegResponse::Auth_OpenID_SRegResponse (   $data = null,
  $sreg_ns_uri = Auth_OpenID_SREG_NS_URI 
)

Definition at line 421 of file SReg.php.

Referenced by extractResponse(), and fromSuccessResponse().

{
if ($data === null) {
$this->data = array();
} else {
$this->data = $data;
}
$this->ns_uri = $sreg_ns_uri;
}

+ Here is the caller graph for this function:

Auth_OpenID_SRegResponse::contents ( )

Definition at line 515 of file SReg.php.

{
return $this->data;
}
static Auth_OpenID_SRegResponse::extractResponse (   $request,
  $data 
)
static

Take a C{L{SRegRequest}} and a dictionary of simple registration values and create a C{L{SRegResponse}} object containing that data.

request: The simple registration request object

data: The simple registration data for this response, as a dictionary from unqualified simple registration field name to string (unicode) value. For instance, the nickname should be stored under the key 'nickname'.

Definition at line 445 of file SReg.php.

References Auth_OpenID\arrayGet(), and Auth_OpenID_SRegResponse().

{
$obj->ns_uri = $request->ns_uri;
foreach ($request->allRequestedFields() as $field) {
$value = Auth_OpenID::arrayGet($data, $field);
if ($value !== null) {
$obj->data[$field] = $value;
}
}
return $obj;
}

+ Here is the call graph for this function:

static Auth_OpenID_SRegResponse::fromSuccessResponse (   $success_response,
  $signed_only = true 
)
static

Create a C{L{SRegResponse}} object from a successful OpenID library response (C{L{openid.consumer.consumer.SuccessResponse}}) response message.

success_response: A SuccessResponse from consumer.complete()

signed_only: Whether to process only data that was signed in the id_res message from the server.

Returns a simple registration response containing the data that was supplied with the C{id_res} response.

Definition at line 474 of file SReg.php.

References $Auth_OpenID_sreg_data_fields, Auth_OpenID_SRegResponse(), and Auth_OpenID\isFailure().

Referenced by ilAuthContainerOpenId\fetchData().

{
$obj->ns_uri = $obj->_getSRegNS($success_response->message);
if ($signed_only) {
$args = $success_response->getSignedNS($obj->ns_uri);
} else {
$args = $success_response->message->getArgs($obj->ns_uri);
}
if ($args === null || Auth_OpenID::isFailure($args)) {
return null;
}
foreach ($Auth_OpenID_sreg_data_fields as $field_name => $desc) {
if (in_array($field_name, array_keys($args))) {
$obj->data[$field_name] = $args[$field_name];
}
}
return $obj;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Auth_OpenID_SRegResponse::get (   $field_name,
  $default = null 
)

Definition at line 506 of file SReg.php.

References Auth_OpenID\arrayGet(), and Auth_OpenID_checkFieldName().

{
if (!Auth_OpenID_checkFieldName($field_name)) {
return null;
}
return Auth_OpenID::arrayGet($this->data, $field_name, $default);
}

+ Here is the call graph for this function:

Auth_OpenID_SRegResponse::getExtensionArgs ( )

Get the string arguments that should be added to an OpenID message for this extension.

Reimplemented from Auth_OpenID_Extension.

Definition at line 500 of file SReg.php.

{
return $this->data;
}

Field Documentation

Auth_OpenID_SRegResponse::$ns_alias = 'sreg'

Definition at line 419 of file SReg.php.


The documentation for this class was generated from the following file: