ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilAuthContainerMultiple Class Reference
+ Inheritance diagram for ilAuthContainerMultiple:
+ Collaboration diagram for ilAuthContainerMultiple:

Public Member Functions

 __construct ()
 Constructor. More...
 
 failedLoginObserver ($a_username, $a_auth)
 
 loginObserver ($a_username, $a_auth)
 
 checkAuthObserver ($a_username, $a_auth)
 
 fetchData ($user, $pass)
 
 supportsCaptchaVerification ()
 
- Public Member Functions inherited from Auth_Container
 Auth_Container ()
 Constructor. More...
 
 fetchData ($username, $password, $isChallengeResponse=false)
 Fetch data from storage container. More...
 
 verifyPassword ($password1, $password2, $cryptType="md5")
 Crypt and verfiy the entered password. More...
 
 supportsChallengeResponse ()
 Returns true if the container supports Challenge Response password authentication. More...
 
 getCryptType ()
 Returns the crypt current crypt type of the container. More...
 
 listUsers ()
 List all users that are available from the storage container. More...
 
 getUser ($username)
 Returns a user assoc array. More...
 
 addUser ($username, $password, $additional=null)
 Add a new user to the storage container. More...
 
 removeUser ($username)
 Remove user from the storage container. More...
 
 changePassword ($username, $password)
 Change password for user in the storage container. More...
 
 log ($message, $level=AUTH_LOG_DEBUG)
 Log a message to the Auth log. More...
 
- Public Member Functions inherited from ilAuthContainerBase
 loginObserver ($a_username, $a_auth)
 Called after successful login. More...
 
 failedLoginObserver ($a_username, $a_auth)
 Called after failed login. More...
 
 checkAuthObserver ($a_username, $a_auth)
 Called after check auth requests. More...
 
 logoutObserver ($a_username, $a_auth)
 Called after logout. More...
 
 supportsCaptchaVerification ()
 Returns whether or not the auth container supports the verification of captchas This should be true for those auth methods, which are available in the default login form. More...
 

Protected Attributes

 $current_container = null
 

Additional Inherited Members

- Data Fields inherited from Auth_Container
 $activeUser = ""
 User that is currently selected from the storage container. More...
 
 $_auth_obj = null
 The Auth object this container is attached to. More...
 

Detailed Description

Author
Stefan Meyer smeye.nosp@m.r@le.nosp@m.ifos..nosp@m.com
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilAuthContainerMultiple::__construct ( )

Constructor.

Returns

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

46 {
47 parent::__construct();
48
49 include_once './Services/Database/classes/class.ilAuthContainerMDB2.php';
50 $this->current_container = new ilAuthContainerMDB2();
51 }
Authentication against ILIAS database.

Member Function Documentation

◆ checkAuthObserver()

ilAuthContainerMultiple::checkAuthObserver (   $a_username,
  $a_auth 
)
See also
ilAuthContainerBase::checkAuthObserver()

Reimplemented from ilAuthContainerBase.

Definition at line 80 of file class.ilAuthContainerMultiple.php.

81 {
82 $this->log('Container Multiple: checkAuthObserver',AUTH_LOG_DEBUG);
83 // Forward to current container
84 if($this->current_container instanceof Auth_Container)
85 {
86 $this->log('Container Multiple: Forwarding to '.get_class($this->current_container),AUTH_LOG_DEBUG);
87 return $this->current_container->checkAuthObserver($a_username, $a_auth);
88 }
89 return false;
90 }
const AUTH_LOG_DEBUG
Auth Log level - DEBUG.
Definition: Auth.php:59
log($message, $level=AUTH_LOG_DEBUG)
Log a message to the Auth log.
Definition: Container.php:246

References AUTH_LOG_DEBUG, and Auth_Container\log().

+ Here is the call graph for this function:

◆ failedLoginObserver()

ilAuthContainerMultiple::failedLoginObserver (   $a_username,
  $a_auth 
)
See also
ilAuthContainerBase::failedLoginObserver()

Reimplemented from ilAuthContainerBase.

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

57 {
58 $this->log('Auth_Container_Multiple: All containers rejected user credentials.', AUTH_LOG_DEBUG);
59 return false;
60 }

References AUTH_LOG_DEBUG, and Auth_Container\log().

+ Here is the call graph for this function:

◆ fetchData()

ilAuthContainerMultiple::fetchData (   $user,
  $pass 
)

Definition at line 93 of file class.ilAuthContainerMultiple.php.

94 {
95 foreach(ilAuthModeDetermination::_getInstance()->getAuthModeSequence() as $auth_mode)
96 {
97 if ($_REQUEST['force_mode_apache'])
98 {
99 $this->log('Container Apache: Trying new container',AUTH_LOG_DEBUG);
100 include_once './Services/AuthApache/classes/class.ilAuthContainerApache.php';
101 $this->current_container = new ilAuthContainerApache();
102
103 $auth = new ilAuthApache($this->current_container);
104 }
105 else
106 {
107 switch($auth_mode)
108 {
109 case AUTH_LDAP:
110 $this->log('Container LDAP: Trying new container',AUTH_LOG_DEBUG);
111 include_once './Services/LDAP/classes/class.ilAuthContainerLDAP.php';
112 $this->current_container = new ilAuthContainerLDAP();
113 break;
114
115 case AUTH_LOCAL:
116 $this->log('Container MDB2: Trying new container',AUTH_LOG_DEBUG);
117 include_once './Services/Database/classes/class.ilAuthContainerMDB2.php';
118 $this->current_container = new ilAuthContainerMDB2();
119 break;
120
121 case AUTH_SOAP:
122 $this->log('Container SOAP: Trying new container',AUTH_LOG_DEBUG);
123 include_once './Services/SOAPAuth/classes/class.ilAuthContainerSOAP.php';
124 $this->current_container = new ilAuthContainerSOAP();
125 break;
126
127 case AUTH_RADIUS:
128 $this->log('Container Radius: Trying new container',AUTH_LOG_DEBUG);
129 include_once './Services/Radius/classes/class.ilAuthContainerRadius.php';
130 $this->current_container = new ilAuthContainerRadius();
131 break;
132
133 // begin-patch auth_plugin
134 default:
135 $this->log('Container Plugin: Trying new container',AUTH_LOG_DEBUG);
136 foreach(ilAuthUtils::getAuthPlugins() as $pl)
137 {
138 $container = $pl->getContainer($auth_mode);
139 if($container instanceof Auth_Container)
140 {
141 $this->current_container = $container;
142 break;
143 }
144 }
145 break;
146 // end-patch auth_plugin
147
148 }
149 }
150 $this->current_container->_auth_obj = $this->_auth_obj;
151
152 $result = $this->current_container->fetchData($user, $pass);
153
155 {
156 $this->log('Container '.$key.': '.$result->getMessage(), AUTH_LOG_ERR);
157 // Do not return here, otherwise wrong configured auth modes might block ilias database authentication
158 }
159 elseif ($result == true)
160 {
161 $this->log('Container '.$key.': Authentication successful.', AUTH_LOG_DEBUG);
162 return true;
163 }
164 else
165 {
166 $this->log('Container '.$key.': Authentication failed.', AUTH_LOG_DEBUG);
167 }
168 }
169 return false;
170 }
$result
$_auth_obj
The Auth object this container is attached to.
Definition: Container.php:56
isError($data, $code=null)
Tell whether a value is a PEAR error.
Definition: PEAR.php:279
const AUTH_LDAP
const AUTH_LOCAL
const AUTH_RADIUS
const AUTH_SOAP
@classDescription Apache based authentication
Authentication against ILIAS database.
Overwritten Pear class AuthContainerLDAP This class is overwritten to support nested groups.
@classDescription Overwritten Pear class AuthContainerRadius This class is overwritten to support to ...
@classDescription Authentication against external SOAP server
static getAuthPlugins()
Get active enabled auth plugins.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

References Auth_Container\$_auth_obj, $_REQUEST, $auth, $pass, $result, ilAuthModeDetermination\_getInstance(), AUTH_LDAP, AUTH_LOCAL, AUTH_LOG_DEBUG, AUTH_RADIUS, AUTH_SOAP, ilAuthUtils\getAuthPlugins(), PEAR\isError(), and Auth_Container\log().

+ Here is the call graph for this function:

◆ loginObserver()

ilAuthContainerMultiple::loginObserver (   $a_username,
  $a_auth 
)
See also
ilAuthContainerBase::loginObserver()

Reimplemented from ilAuthContainerBase.

Definition at line 65 of file class.ilAuthContainerMultiple.php.

66 {
67 $this->log('Container Multiple: loginObserver'.get_class($this->current_container),AUTH_LOG_DEBUG);
68 // Forward to current container
69 if($this->current_container instanceof Auth_Container)
70 {
71 $this->log('Container Multiple: Forwarding to '.get_class($this->current_container),AUTH_LOG_DEBUG);
72 return $this->current_container->loginObserver($a_username, $a_auth);
73 }
74 return false;
75 }

References AUTH_LOG_DEBUG, and Auth_Container\log().

+ Here is the call graph for this function:

◆ supportsCaptchaVerification()

ilAuthContainerMultiple::supportsCaptchaVerification ( )
Returns
bool

Reimplemented from ilAuthContainerBase.

Definition at line 175 of file class.ilAuthContainerMultiple.php.

176 {
177 return true;
178 }

Field Documentation

◆ $current_container

ilAuthContainerMultiple::$current_container = null
protected

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


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