ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
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. More...
 
 addAllowedType ($assoc_type, $session_type=null)
 Add an association type and session type to the allowed types list. More...
 
 isAllowed ($assoc_type, $session_type)
 
 getAllowedType ()
 Get a pair of assocation type and session type that are supported. More...
 

Detailed Description

Definition at line 525 of file Association.php.

Member Function Documentation

◆ addAllowedType()

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

559  {
560  if ($this->allowed_types === null) {
561  $this->allowed_types = array();
562  }
563 
564  if ($session_type === null) {
565  $available = Auth_OpenID_getSessionTypes($assoc_type);
566 
567  if (!$available) {
568  return false;
569  }
570 
571  foreach ($available as $session_type) {
572  $this->addAllowedType($assoc_type, $session_type);
573  }
574  } else {
575  if (Auth_OpenID_checkSessionType($assoc_type, $session_type)) {
576  $this->allowed_types[] = array($assoc_type, $session_type);
577  } else {
578  return false;
579  }
580  }
581 
582  return true;
583  }
addAllowedType($assoc_type, $session_type=null)
Add an association type and session type to the allowed types list.
Auth_OpenID_getSessionTypes($assoc_type)
Auth_OpenID_checkSessionType($assoc_type, $session_type)
+ Here is the call graph for this function:

◆ Auth_OpenID_SessionNegotiator()

Auth_OpenID_SessionNegotiator::Auth_OpenID_SessionNegotiator (   $allowed_types)

Definition at line 526 of file Association.php.

527  {
528  $this->allowed_types = array();
529  $this->setAllowedTypes($allowed_types);
530  }
setAllowedTypes($allowed_types)
Set the allowed association types, checking to make sure each combination is valid.

◆ getAllowedType()

Auth_OpenID_SessionNegotiator::getAllowedType ( )

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

Definition at line 601 of file Association.php.

602  {
603  if (!$this->allowed_types) {
604  return array(null, null);
605  }
606 
607  return $this->allowed_types[0];
608  }

◆ isAllowed()

Auth_OpenID_SessionNegotiator::isAllowed (   $assoc_type,
  $session_type 
)

Definition at line 586 of file Association.php.

References Auth_OpenID_getSessionTypes().

587  {
588  $assoc_good = in_array(array($assoc_type, $session_type),
589  $this->allowed_types);
590 
591  $matches = in_array($session_type,
592  Auth_OpenID_getSessionTypes($assoc_type));
593 
594  return ($assoc_good && $matches);
595  }
Auth_OpenID_getSessionTypes($assoc_type)
+ Here is the call graph for this function:

◆ setAllowedTypes()

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

539  {
540  foreach ($allowed_types as $pair) {
541  list($assoc_type, $session_type) = $pair;
542  if (!Auth_OpenID_checkSessionType($assoc_type, $session_type)) {
543  return false;
544  }
545  }
546 
547  $this->allowed_types = $allowed_types;
548  return true;
549  }
Auth_OpenID_checkSessionType($assoc_type, $session_type)
+ Here is the call graph for this function:

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