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

Public Member Functions

 Auth_OpenID_SessionNegotiator ($allowed_types)
 setAllowedTypes ($allowed_types)
 Set the allowed association types, checking to make sure each combination is valid.
 addAllowedType ($assoc_type, $session_type=null)
 Add an association type and session type to the allowed types list.
 isAllowed ($assoc_type, $session_type)
 getAllowedType ()
 Get a pair of assocation type and session type that are supported.

Detailed Description

Definition at line 525 of file Association.php.

Member Function Documentation

Auth_OpenID_SessionNegotiator::addAllowedType (   $assoc_type,
  $session_type = null 
)

Add an association type and session type to the allowed types list.

The assocation/session pairs are tried in the order that they are added.

private

Definition at line 558 of file Association.php.

References Auth_OpenID_checkSessionType(), and Auth_OpenID_getSessionTypes().

{
if ($this->allowed_types === null) {
$this->allowed_types = array();
}
if ($session_type === null) {
$available = Auth_OpenID_getSessionTypes($assoc_type);
if (!$available) {
return false;
}
foreach ($available as $session_type) {
$this->addAllowedType($assoc_type, $session_type);
}
} else {
if (Auth_OpenID_checkSessionType($assoc_type, $session_type)) {
$this->allowed_types[] = array($assoc_type, $session_type);
} else {
return false;
}
}
return true;
}

+ Here is the call graph for this function:

Auth_OpenID_SessionNegotiator::Auth_OpenID_SessionNegotiator (   $allowed_types)

Definition at line 526 of file Association.php.

References setAllowedTypes().

{
$this->allowed_types = array();
$this->setAllowedTypes($allowed_types);
}

+ Here is the call graph for this function:

Auth_OpenID_SessionNegotiator::getAllowedType ( )

Get a pair of assocation type and session type that are supported.

Definition at line 601 of file Association.php.

{
if (!$this->allowed_types) {
return array(null, null);
}
return $this->allowed_types[0];
}
Auth_OpenID_SessionNegotiator::isAllowed (   $assoc_type,
  $session_type 
)

Definition at line 586 of file Association.php.

References Auth_OpenID_getSessionTypes().

{
$assoc_good = in_array(array($assoc_type, $session_type),
$this->allowed_types);
$matches = in_array($session_type,
return ($assoc_good && $matches);
}

+ Here is the call graph for this function:

Auth_OpenID_SessionNegotiator::setAllowedTypes (   $allowed_types)

Set the allowed association types, checking to make sure each combination is valid.

private

Definition at line 538 of file Association.php.

References Auth_OpenID_checkSessionType().

Referenced by Auth_OpenID_SessionNegotiator().

{
foreach ($allowed_types as $pair) {
list($assoc_type, $session_type) = $pair;
if (!Auth_OpenID_checkSessionType($assoc_type, $session_type)) {
return false;
}
}
$this->allowed_types = $allowed_types;
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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