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

Static Public Member Functions

static _getSRegNS ($message)
 Extract the simple registration namespace URI from the given OpenID message.

Additional Inherited Members

- Public Member Functions inherited from Auth_OpenID_Extension
 getExtensionArgs ()
 Get the string arguments that should be added to an OpenID message for this extension.
 toMessage ($message)
 Add the arguments from this extension to the provided message.
- Data Fields inherited from Auth_OpenID_Extension
 $ns_uri = null
 ns_uri: The namespace to which to add the arguments for this extension
 $ns_alias = null

Detailed Description

Definition at line 109 of file SReg.php.

Member Function Documentation

static Auth_OpenID_SRegBase::_getSRegNS (   $message)
static

Extract the simple registration namespace URI from the given OpenID message.

Handles OpenID 1 and 2, as well as both sreg namespace URIs found in the wild, as well as missing namespace definitions (for OpenID 1)

$message: The OpenID message from which to parse simple registration fields. This may be a request or response message.

Returns the sreg namespace URI for the supplied message. The message may be modified to define a simple registration namespace.

private

Definition at line 125 of file SReg.php.

References Auth_OpenID_SREG_NS_URI_1_0, and Auth_OpenID_SREG_NS_URI_1_1.

{
$alias = null;
$found_ns_uri = null;
// See if there exists an alias for one of the two defined
// simple registration types.
Auth_OpenID_SREG_NS_URI_1_0) as $sreg_ns_uri) {
$alias = $message->namespaces->getAlias($sreg_ns_uri);
if ($alias !== null) {
$found_ns_uri = $sreg_ns_uri;
break;
}
}
if ($alias === null) {
// There is no alias for either of the types, so try to
// add one. We default to using the modern value (1.1)
$found_ns_uri = Auth_OpenID_SREG_NS_URI_1_1;
if ($message->namespaces->addAlias(Auth_OpenID_SREG_NS_URI_1_1,
'sreg') === null) {
// An alias for the string 'sreg' already exists, but
// it's defined for something other than simple
// registration
return null;
}
}
return $found_ns_uri;
}

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