ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilAuthFactory Class Reference

@classDescription Factory for PEAR Auth frontend classes More...

+ Collaboration diagram for ilAuthFactory:

Static Public Member Functions

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

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

@classDescription 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

◆ factory()

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.

142 {
143 $options = self::getContextOptions(self::getContext());
144
145 switch(self::$context)
146 {
148 include_once './Services/Authentication/classes/class.ilAuthWeb.php';
149 return new ilAuthWeb($deco,$options);
150
152 include_once './Services/Authentication/classes/class.ilAuthHTTP.php';
153 return new ilAuthHTTP($deco,$options);
154
156 include_once './Services/WebServices/SOAP/classes/class.ilAuthSOAP.php';
157 return new ilAuthSOAP($deco,$options);
158
160 include_once './Services/CAS/classes/class.ilAuthCAS.php';
161 return new ilAuthCAS($deco,$options);
162
164 include_once './Services/Calendar/classes/class.ilAuthCalendar.php';
165 return new ilAuthCalendar($deco,$options);
166
168 include_once './Services/Calendar/classes/class.ilAuthCalendarToken.php';
169 include_once './Services/Calendar/classes/class.ilAuthContainerCalendarToken.php';
170 // Force token authentication
171 $GLOBALS['ilLog']->write('Calling calendar token');
173
175 include_once './cron/classes/class.ilAuthCron.php';
176 return new ilAuthCron($deco,$options);
177
179 include_once './Services/WebServices/ECS/classes/class.ilAuthECS.php';
180 return new ilAuthECS($deco,$options);
181
183 include_once './Services/OpenId/classes/class.ilAuthOpenId.php';
184 return new ilAuthOpenId($deco,$options);
185
187 include_once './Services/AuthApache/classes/class.ilAuthApache.php';
188 return new ilAuthApache($deco,$options);
189 }
190 }
@classDescription Apache based authentication
@classDescription CAS authentication
Class for calendar authentication.
Class for calendar authentication.
@classDescription Calendar token based authentication
Base class for ilAuth, ilAuthHTTP ....
Authentication class for ECS users (access to remote courses)
static getContextOptions()
Get options for a specific context.
Base class for ilAuth, ilAuthHTTP ....
@classDescription Open ID auth class
@classDescription Frontend class for SOAP based authentication
@classDescription Web based authentication
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276
if(!is_array($argv)) $options

References $GLOBALS, $options, CONTEXT_APACHE, CONTEXT_CALENDAR, CONTEXT_CALENDAR_TOKEN, CONTEXT_CAS, CONTEXT_CRON, CONTEXT_ECS, CONTEXT_HTTP, CONTEXT_OPENID, CONTEXT_SOAP, CONTEXT_WEB, and getContextOptions().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getContext()

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

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

97 {
98 return self::$context;
99 }

References $context.

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

+ Here is the caller graph for this function:

◆ getContextOptions()

static ilAuthFactory::getContextOptions ( )
static

Get options for a specific context.

Returns

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

128 {
129 return self::$context_options[$a_context] ?
130 self::$context_options[$a_context] :
131 array();
132 }

Referenced by factory().

+ Here is the caller graph for this function:

◆ setContext()

static ilAuthFactory::setContext (   $a_context)
static

set context

Parameters
int$a_context
Returns

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

107 {
108 self::$context = $a_context;
109 }

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

+ Here is the caller graph for this function:

◆ setContextOptions()

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.

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

Field Documentation

◆ $context

ilAuthFactory::$context = self::CONTEXT_WEB
staticprivate

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

Referenced by getContext().

◆ $context_options

ilAuthFactory::$context_options = array()
staticprivate

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

◆ CONTEXT_APACHE

const ilAuthFactory::CONTEXT_APACHE = 10

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

Referenced by ilAuthUtils\_initAuth(), and factory().

◆ CONTEXT_CALENDAR

const ilAuthFactory::CONTEXT_CALENDAR = 6

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

Referenced by factory().

◆ CONTEXT_CALENDAR_TOKEN

const ilAuthFactory::CONTEXT_CALENDAR_TOKEN = 7

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

Referenced by factory(), and ilCalendarRemoteAccessHandler\initIlias().

◆ CONTEXT_CAS

const ilAuthFactory::CONTEXT_CAS = 5

◆ CONTEXT_CRON

const ilAuthFactory::CONTEXT_CRON = 4

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

Referenced by factory(), pr(), and vd().

◆ CONTEXT_ECS

const ilAuthFactory::CONTEXT_ECS = 8

◆ CONTEXT_HTTP

const ilAuthFactory::CONTEXT_HTTP = 2

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

Referenced by factory(), and ilInitialisation\setCookieParams().

◆ CONTEXT_OPENID

const ilAuthFactory::CONTEXT_OPENID = 9

◆ CONTEXT_SOAP

const ilAuthFactory::CONTEXT_SOAP = 3

◆ CONTEXT_WEB

const ilAuthFactory::CONTEXT_WEB = 1

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

Referenced by factory().


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