ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilAuthFactory Class Reference

Factory for PEAR Auth frontend classes More...

+ Collaboration diagram for ilAuthFactory:

Static Public Member Functions

static getContext ()
static setContext ($a_context)
 set context
static setContextOptions ($a_context, $a_options)
 set context specific options for later use in factory.
static getContextOptions ()
 Get options for a specific context.
static factory (ilAuthContainerBase $deco)
 The factory.

Data Fields

const CONTEXT_WEB = 1
const CONTEXT_HTTP = 2
const CONTEXT_SOAP = 3
const CONTEXT_CRON = 4
const CONTEXT_CAS = 5
const CONTEXT_CALENDAR = 6
const CONTEXT_CALENDAR_TOKEN = 7
const CONTEXT_ECS = 8
const CONTEXT_OPENID = 9
const CONTEXT_APACHE = 10

Static Private Attributes

static $context = self::CONTEXT_WEB
static $context_options = array()

Detailed Description

Factory for PEAR Auth frontend classes

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 14 of file class.ilAuthFactory.php.

Member Function Documentation

static ilAuthFactory::factory ( ilAuthContainerBase  $deco)
static

The factory.

Parameters
object$containerilAuthContainerBase
array$options
Returns
object ilAuthContainerBase

Definition at line 141 of file class.ilAuthFactory.php.

References $GLOBALS, $options, and getContextOptions().

Referenced by ilAuthUtils\_initAuth(), and ilStartUpGUI\migrateAccount().

{
$options = self::getContextOptions(self::getContext());
switch(self::$context)
{
case self::CONTEXT_WEB:
include_once './Services/Authentication/classes/class.ilAuthWeb.php';
return new ilAuthWeb($deco,$options);
case self::CONTEXT_HTTP:
include_once './Services/Authentication/classes/class.ilAuthHTTP.php';
return new ilAuthHTTP($deco,$options);
case self::CONTEXT_SOAP:
include_once './Services/WebServices/SOAP/classes/class.ilAuthSOAP.php';
return new ilAuthSOAP($deco,$options);
case self::CONTEXT_CAS:
include_once './Services/CAS/classes/class.ilAuthCAS.php';
return new ilAuthCAS($deco,$options);
case self::CONTEXT_CALENDAR:
include_once './Services/Calendar/classes/class.ilAuthCalendar.php';
return new ilAuthCalendar($deco,$options);
case self::CONTEXT_CALENDAR_TOKEN:
include_once './Services/Calendar/classes/class.ilAuthCalendarToken.php';
include_once './Services/Calendar/classes/class.ilAuthContainerCalendarToken.php';
// Force token authentication
$GLOBALS['ilLog']->write('Calling calendar token');
case self::CONTEXT_CRON:
include_once './cron/classes/class.ilAuthCron.php';
return new ilAuthCron($deco,$options);
case self::CONTEXT_ECS:
include_once './Services/WebServices/ECS/classes/class.ilAuthECS.php';
return new ilAuthECS($deco,$options);
case self::CONTEXT_OPENID:
include_once './Services/OpenId/classes/class.ilAuthOpenId.php';
return new ilAuthOpenId($deco,$options);
case self::CONTEXT_APACHE:
include_once './Services/AuthApache/classes/class.ilAuthApache.php';
return new ilAuthApache($deco,$options);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilAuthFactory::getContext ( )
static
Returns
int current context

Definition at line 96 of file class.ilAuthFactory.php.

References $context.

Referenced by ilInitialisation\includePhp5Compliance(), ilAuthBase\loginObserver(), pr(), ilInitialisation\setCookieParams(), and vd().

{
}

+ Here is the caller graph for this function:

static ilAuthFactory::getContextOptions ( )
static

Get options for a specific context.

Returns

Definition at line 127 of file class.ilAuthFactory.php.

Referenced by factory().

{
return self::$context_options[$a_context] ?
self::$context_options[$a_context] :
array();
}

+ Here is the caller graph for this function:

static ilAuthFactory::setContext (   $a_context)
static

set context

Parameters
int$a_context
Returns

Definition at line 106 of file class.ilAuthFactory.php.

Referenced by ilSoapAdministration\__initAuthenticationObject(), ilAuthUtils\_getAuthModeOfUser(), ilAuthUtils\_initAuth(), ilCalendarRemoteAccessHandler\initIlias(), and ilStartUpGUI\migrateAccount().

{
self::$context = $a_context;
}

+ Here is the caller graph for this function:

static ilAuthFactory::setContextOptions (   $a_context,
  $a_options 
)
static

set context specific options for later use in factory.

Returns
Parameters
object$a_context
object$a_options

Definition at line 118 of file class.ilAuthFactory.php.

{
self::$context_options[$a_context] = $a_options;
}

Field Documentation

ilAuthFactory::$context = self::CONTEXT_WEB
staticprivate

Definition at line 85 of file class.ilAuthFactory.php.

Referenced by getContext().

ilAuthFactory::$context_options = array()
staticprivate

Definition at line 90 of file class.ilAuthFactory.php.

const ilAuthFactory::CONTEXT_APACHE = 10

Definition at line 80 of file class.ilAuthFactory.php.

Referenced by ilAuthUtils\_initAuth().

const ilAuthFactory::CONTEXT_CALENDAR = 6

Definition at line 53 of file class.ilAuthFactory.php.

const ilAuthFactory::CONTEXT_CALENDAR_TOKEN = 7

Definition at line 60 of file class.ilAuthFactory.php.

Referenced by ilCalendarRemoteAccessHandler\initIlias().

const ilAuthFactory::CONTEXT_CAS = 5
const ilAuthFactory::CONTEXT_CRON = 4

Definition at line 42 of file class.ilAuthFactory.php.

Referenced by pr(), and vd().

const ilAuthFactory::CONTEXT_ECS = 8
const ilAuthFactory::CONTEXT_HTTP = 2

Definition at line 29 of file class.ilAuthFactory.php.

Referenced by ilInitialisation\setCookieParams().

const ilAuthFactory::CONTEXT_OPENID = 9
const ilAuthFactory::CONTEXT_SOAP = 3
const ilAuthFactory::CONTEXT_WEB = 1

Definition at line 20 of file class.ilAuthFactory.php.


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