ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilAuthFrontendFactory Class Reference

Factory for auth frontend classes. More...

+ Collaboration diagram for ilAuthFrontendFactory:

Public Member Functions

 __construct ()
 Constructor. More...
 
 getLogger ()
 
 setContext ($a_context)
 Set context for following authentication requests. More...
 
 getContext ()
 Get context. More...
 
 getFrontend (ilAuthSession $session, ilAuthStatus $status, ilAuthCredentials $credentials, array $providers)
 

Data Fields

const CONTEXT_UNDEFINED = 0
 
const CONTEXT_STANDARD_FORM = 2
 
const CONTEXT_CLI = 3
 
const CONTEXT_WS = 4
 
const CONTEXT_HTTP = 5
 

Private Attributes

 $context = self::CONTEXT_UNDEFINED
 
 $credentials = null
 
 $logger = null
 

Detailed Description

Factory for auth frontend classes.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

Definition at line 11 of file class.ilAuthFrontendFactory.php.

Constructor & Destructor Documentation

◆ __construct()

ilAuthFrontendFactory::__construct ( )

Constructor.

Definition at line 37 of file class.ilAuthFrontendFactory.php.

References ilLoggerFactory\getLogger().

38  {
39  $this->logger = ilLoggerFactory::getLogger('auth');
40  }
static getLogger($a_component_id)
Get component logger.
+ Here is the call graph for this function:

Member Function Documentation

◆ getContext()

ilAuthFrontendFactory::getContext ( )

Get context.

Returns
int

Definition at line 64 of file class.ilAuthFrontendFactory.php.

References $context.

Referenced by getFrontend().

+ Here is the caller graph for this function:

◆ getFrontend()

ilAuthFrontendFactory::getFrontend ( ilAuthSession  $session,
ilAuthStatus  $status,
ilAuthCredentials  $credentials,
array  $providers 
)
Returns

Definition at line 72 of file class.ilAuthFrontendFactory.php.

References getContext(), and getLogger().

73  {
74  switch($this->getContext())
75  {
76  case self::CONTEXT_CLI:
77  $this->getLogger()->debug('Init auth frontend with standard auth context');
78  include_once './Services/Authentication/classes/Frontend/class.ilAuthFrontendCLI.php';
79  $frontend = new ilAuthFrontendCLI(
80  $session,
81  $status,
82  $credentials,
83  $providers
84  );
85  return $frontend;
86 
87  case self::CONTEXT_WS:
88  $this->getLogger()->debug('Init auth frontend with webservice auth context');
89  include_once './Services/Authentication/classes/Frontend/class.ilAuthFrontendWS.php';
90  $frontend = new ilAuthFrontendWS(
91  $session,
92  $status,
93  $credentials,
94  $providers
95  );
96  return $frontend;
97 
98  case self::CONTEXT_STANDARD_FORM:
99  $this->getLogger()->debug('Init auth frontend with standard auth context');
100  include_once './Services/Authentication/classes/Frontend/class.ilAuthStandardFormFrontend.php';
101  $frontend = new ilAuthStandardFormFrontend(
102  $session,
103  $status,
104  $credentials,
105  $providers
106  );
107  return $frontend;
108 
109  case self::CONTEXT_HTTP:
110  $this->getLogger()->debug('Init auth frontend with http basic auth context');
111  include_once './Services/Authentication/classes/Frontend/class.ilAuthFrontendHTTP.php';
112  $frontend = new ilAuthFrontendHTTP(
113  $session,
114  $status,
115  $credentials,
116  $providers
117  );
118  return $frontend;
119 
120  case self::CONTEXT_UNDEFINED:
121  $this->getLogger()->error('Trying to init auth with empty context');
122  break;
123  }
124  }
Description of class class.
Description of class class.
Auth class for form based authentication.
Description of class class.
+ Here is the call graph for this function:

◆ getLogger()

ilAuthFrontendFactory::getLogger ( )
Returns

Definition at line 46 of file class.ilAuthFrontendFactory.php.

References $logger.

Referenced by getFrontend().

+ Here is the caller graph for this function:

◆ setContext()

ilAuthFrontendFactory::setContext (   $a_context)

Set context for following authentication requests.

Parameters
int$a_context

Definition at line 55 of file class.ilAuthFrontendFactory.php.

56  {
57  $this->context = $a_context;
58  }

Field Documentation

◆ $context

ilAuthFrontendFactory::$context = self::CONTEXT_UNDEFINED
private

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

Referenced by getContext().

◆ $credentials

ilAuthFrontendFactory::$credentials = null
private

Definition at line 30 of file class.ilAuthFrontendFactory.php.

◆ $logger

ilAuthFrontendFactory::$logger = null
private

Definition at line 31 of file class.ilAuthFrontendFactory.php.

Referenced by getLogger().

◆ CONTEXT_CLI

const ilAuthFrontendFactory::CONTEXT_CLI = 3

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

Referenced by ilCronStartUp\authenticate().

◆ CONTEXT_HTTP

const ilAuthFrontendFactory::CONTEXT_HTTP = 5

Definition at line 26 of file class.ilAuthFrontendFactory.php.

Referenced by ilDAVServer\tryAuthentication().

◆ CONTEXT_STANDARD_FORM

◆ CONTEXT_UNDEFINED

const ilAuthFrontendFactory::CONTEXT_UNDEFINED = 0

Definition at line 13 of file class.ilAuthFrontendFactory.php.

◆ CONTEXT_WS

const ilAuthFrontendFactory::CONTEXT_WS = 4

Definition at line 23 of file class.ilAuthFrontendFactory.php.


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