ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilAuthFrontendFactory Class Reference
+ Collaboration diagram for ilAuthFrontendFactory:

Public Member Functions

 __construct ()
 
 setContext (int $a_context)
 
 getContext ()
 
 getFrontend (ilAuthSession $session, ilAuthStatus $status, ilAuthCredentials $credentials, array $providers)
 

Data Fields

const int CONTEXT_STANDARD_FORM = 2
 Authentication with id and password. More...
 
const int CONTEXT_CLI = 3
 
const int CONTEXT_WS = 4
 
const int CONTEXT_HTTP = 5
 

Private Attributes

const int CONTEXT_UNDEFINED = 0
 
int $context = self::CONTEXT_UNDEFINED
 
ilLogger $logger
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilAuthFrontendFactory::__construct ( )

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

References $DIC, and ILIAS\Repository\logger().

38  {
39  global $DIC;
40  $this->logger = $DIC->logger()->auth();
41  }
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

Member Function Documentation

◆ getContext()

ilAuthFrontendFactory::getContext ( )

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

References $context.

Referenced by getFrontend().

48  : int
49  {
50  return $this->context;
51  }
+ Here is the caller graph for this function:

◆ getFrontend()

ilAuthFrontendFactory::getFrontend ( ilAuthSession  $session,
ilAuthStatus  $status,
ilAuthCredentials  $credentials,
array  $providers 
)
Parameters
list<ilAuthProviderInterface>$providers

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

References getContext(), ILIAS\Repository\logger(), and null.

62  switch ($this->getContext()) {
63  case self::CONTEXT_CLI:
64  $this->logger->debug('Init auth frontend with standard auth context');
65  $frontend = new ilAuthFrontendCLI(
66  $session,
67  $status,
68  $credentials,
69  $providers
70  );
71  return $frontend;
72 
73  case self::CONTEXT_WS:
74  $this->logger->debug('Init auth frontend with webservice auth context');
75  $frontend = new ilAuthFrontendWS(
76  $session,
77  $status,
78  $credentials,
79  $providers
80  );
81  return $frontend;
82 
83  case self::CONTEXT_STANDARD_FORM:
84  $this->logger->debug('Init auth frontend with standard auth context');
85  $frontend = new ilAuthStandardFormFrontend(
86  $session,
87  $status,
88  $credentials,
89  $providers
90  );
91  return $frontend;
92 
93  case self::CONTEXT_HTTP:
94  $this->logger->debug('Init auth frontend with http basic auth context');
95  $frontend = new ilAuthFrontendHTTP(
96  $session,
97  $status,
98  $credentials,
99  $providers
100  );
101  return $frontend;
102 
103  case self::CONTEXT_UNDEFINED:
104  $this->logger->error('Trying to init auth with empty context');
105  break;
106  }
107 
108  return null;
109  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ setContext()

ilAuthFrontendFactory::setContext ( int  $a_context)

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

43  : void
44  {
45  $this->context = $a_context;
46  }

Field Documentation

◆ $context

int ilAuthFrontendFactory::$context = self::CONTEXT_UNDEFINED
private

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

Referenced by getContext().

◆ $logger

ilLogger ilAuthFrontendFactory::$logger
private

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

◆ CONTEXT_CLI

const int ilAuthFrontendFactory::CONTEXT_CLI = 3

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

Referenced by ILIAS\Cron\CLI\StartUp\authenticate().

◆ CONTEXT_HTTP

const int ilAuthFrontendFactory::CONTEXT_HTTP = 5

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

Referenced by ilWebDAVAuthentication\authenticate().

◆ CONTEXT_STANDARD_FORM

◆ CONTEXT_UNDEFINED

const int ilAuthFrontendFactory::CONTEXT_UNDEFINED = 0
private

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

◆ CONTEXT_WS

const int ilAuthFrontendFactory::CONTEXT_WS = 4

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

Referenced by ilSoapUserAdministration\login().


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