ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilAuthFactory Class Reference

Authentication frontend factory. 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_CAS = 5
 
const CONTEXT_CALENDAR = 6
 
const CONTEXT_CALENDAR_TOKEN = 7
 
const CONTEXT_ECS = 8
 
const CONTEXT_APACHE = 10
 

Static Private Attributes

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

Detailed Description

Authentication frontend factory.

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 130 of file class.ilAuthFactory.php.

References $GLOBALS, and $options.

131  {
132  $options = self::getContextOptions(self::getContext());
133 
134  switch (self::$context) {
135  case self::CONTEXT_WEB:
136  include_once './Services/Authentication/classes/class.ilAuthWeb.php';
137  return new ilAuthWeb($deco, $options);
138 
139  case self::CONTEXT_HTTP:
140  include_once './Services/Authentication/classes/class.ilAuthHTTP.php';
141  return new ilAuthHTTP($deco, $options);
142 
143  case self::CONTEXT_SOAP:
144  include_once './Services/WebServices/SOAP/classes/class.ilAuthSOAP.php';
145  return new ilAuthSOAP($deco, $options);
146 
147  case self::CONTEXT_CAS:
148  include_once './Services/CAS/classes/class.ilAuthCAS.php';
149  return new ilAuthCAS($deco, $options);
150 
151  case self::CONTEXT_CALENDAR:
152  include_once './Services/Calendar/classes/class.ilAuthCalendar.php';
153  return new ilAuthCalendar($deco, $options);
154 
155  case self::CONTEXT_CALENDAR_TOKEN:
156  include_once './Services/Calendar/classes/class.ilAuthCalendarToken.php';
157  include_once './Services/Calendar/classes/class.ilAuthContainerCalendarToken.php';
158  // Force token authentication
159  $GLOBALS['ilLog']->write('Calling calendar token');
161 
162  case self::CONTEXT_ECS:
163  include_once './Services/WebServices/ECS/classes/class.ilAuthECS.php';
164  return new ilAuthECS($deco, $options);
165 
166  case self::CONTEXT_APACHE:
167  include_once './Services/AuthApache/classes/class.ilAuthApache.php';
168  return new ilAuthApache($deco, $options);
169  }
170  }
Class for calendar authentication.
CAS authentication
Class for calendar authentication.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Base class for ilAuth, ilAuthHTTP ....
Calendar token based authentication
Apache based authentication
Frontend class for SOAP based authentication
Authentication class for ECS users (access to remote courses)
Web based authentication
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20

◆ getContext()

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

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

Referenced by ilAuthFrontend\handleAuthenticationSuccess(), ilInitialisation\includePhp5Compliance(), ilAuthBase\loginObserver(), pr(), ilInitialisation\setCookieConstants(), and vd().

86  {
87  return self::$context;
88  }
+ Here is the caller graph for this function:

◆ getContextOptions()

static ilAuthFactory::getContextOptions ( )
static

Get options for a specific context.

Returns

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

References array.

117  {
118  return self::$context_options[$a_context] ?
119  self::$context_options[$a_context] :
120  array();
121  }
Create styles array
The data for the language used.

◆ setContext()

static ilAuthFactory::setContext (   $a_context)
static

set context

Parameters
int$a_context
Returns

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

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

96  {
97  self::$context = $a_context;
98  }
+ 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 107 of file class.ilAuthFactory.php.

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

Field Documentation

◆ $context

ilAuthFactory::$context = self::CONTEXT_WEB
staticprivate

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

◆ $context_options

ilAuthFactory::$context_options = array()
staticprivate

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

◆ CONTEXT_APACHE

const ilAuthFactory::CONTEXT_APACHE = 10

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

◆ CONTEXT_CALENDAR

const ilAuthFactory::CONTEXT_CALENDAR = 6

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

◆ CONTEXT_CALENDAR_TOKEN

const ilAuthFactory::CONTEXT_CALENDAR_TOKEN = 7

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

Referenced by ilCalendarRemoteAccessHandler\initIlias().

◆ CONTEXT_CAS

const ilAuthFactory::CONTEXT_CAS = 5

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

Referenced by ilInitialisation\includePhp5Compliance().

◆ 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 ilInitialisation\setCookieConstants().

◆ CONTEXT_SOAP

const ilAuthFactory::CONTEXT_SOAP = 3

◆ CONTEXT_WEB

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: