ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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.

38 {
39 global $DIC;
40 $this->logger = $DIC->logger()->auth();
41 }
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getContext()

ilAuthFrontendFactory::getContext ( )

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

48 : int
49 {
50 return $this->context;
51 }

References $context.

◆ getFrontend()

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

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

62 switch ($this->getContext()) {
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
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
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
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
104 $this->logger->error('Trying to init auth with empty context');
105 break;
106 }
107
108 return null;
109 }
const int CONTEXT_STANDARD_FORM
Authentication with id and password.

References CONTEXT_CLI, CONTEXT_HTTP, CONTEXT_STANDARD_FORM, CONTEXT_UNDEFINED, CONTEXT_WS, and ILIAS\Repository\logger().

+ 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

◆ CONTEXT_HTTP

const int ilAuthFrontendFactory::CONTEXT_HTTP = 5

◆ CONTEXT_STANDARD_FORM

◆ CONTEXT_UNDEFINED

const int ilAuthFrontendFactory::CONTEXT_UNDEFINED = 0
private

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

Referenced by getFrontend().

◆ CONTEXT_WS

const int ilAuthFrontendFactory::CONTEXT_WS = 4

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

Referenced by getFrontend(), and ilSoapUserAdministration\login().


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