ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilAuthFrontendFactory Class Reference

Factory for auth frontend classes. More...

+ Collaboration diagram for ilAuthFrontendFactory:

Public Member Functions

 __construct ()
 Constructor. More...
 
 setContext (int $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_STANDARD_FORM = 2
 
const CONTEXT_CLI = 3
 
const CONTEXT_WS = 4
 
const CONTEXT_HTTP = 5
 

Private Attributes

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

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 27 of file class.ilAuthFrontendFactory.php.

Constructor & Destructor Documentation

◆ __construct()

ilAuthFrontendFactory::__construct ( )

Constructor.

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

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

53  {
54  global $DIC;
55  $this->logger = $DIC->logger()->auth();
56  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Member Function Documentation

◆ getContext()

ilAuthFrontendFactory::getContext ( )

Get context.

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

References $context.

Referenced by getFrontend().

69  : int
70  {
71  return $this->context;
72  }
+ Here is the caller graph for this function:

◆ getFrontend()

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

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

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

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

◆ setContext()

ilAuthFrontendFactory::setContext ( int  $a_context)

Set context for following authentication requests.

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

61  : void
62  {
63  $this->context = $a_context;
64  }

Field Documentation

◆ $context

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

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

Referenced by getContext().

◆ $logger

ilLogger ilAuthFrontendFactory::$logger
private

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

◆ CONTEXT_CLI

const ilAuthFrontendFactory::CONTEXT_CLI = 3

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

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

◆ CONTEXT_HTTP

const ilAuthFrontendFactory::CONTEXT_HTTP = 5

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

Referenced by ilWebDAVAuthentication\authenticate().

◆ CONTEXT_STANDARD_FORM

◆ CONTEXT_UNDEFINED

const ilAuthFrontendFactory::CONTEXT_UNDEFINED = 0
private

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

◆ CONTEXT_WS

const ilAuthFrontendFactory::CONTEXT_WS = 4

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

Referenced by ilSoapUserAdministration\login().


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