ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilAuthContainerMultiple Class Reference
+ Inheritance diagram for ilAuthContainerMultiple:
+ Collaboration diagram for ilAuthContainerMultiple:

Public Member Functions

 __construct ()
 Constructor.
 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.
 fetchData ($username, $password, $isChallengeResponse=false)
 Fetch data from storage container.
 verifyPassword ($password1, $password2, $cryptType="md5")
 Crypt and verfiy the entered password.
 supportsChallengeResponse ()
 Returns true if the container supports Challenge Response password authentication.
 getCryptType ()
 Returns the crypt current crypt type of the container.
 listUsers ()
 List all users that are available from the storage container.
 getUser ($username)
 Returns a user assoc array.
 addUser ($username, $password, $additional=null)
 Add a new user to the storage container.
 removeUser ($username)
 Remove user from the storage container.
 changePassword ($username, $password)
 Change password for user in the storage container.
 log ($message, $level=AUTH_LOG_DEBUG)
 Log a message to the Auth log.
- Public Member Functions inherited from ilAuthContainerBase
 logoutObserver ($a_username, $a_auth)
 Called after logout.

Protected Attributes

 $current_container = null

Additional Inherited Members

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

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

ilAuthContainerMultiple::__construct ( )

Constructor.

Returns

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

{
include_once './Services/Database/classes/class.ilAuthContainerMDB2.php';
$this->current_container = new ilAuthContainerMDB2();
}

Member Function Documentation

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

Reimplemented from ilAuthContainerBase.

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

References AUTH_LOG_DEBUG, and Auth_Container\log().

{
$this->log('Container Multiple: checkAuthObserver',AUTH_LOG_DEBUG);
// Forward to current container
if($this->current_container instanceof Auth_Container)
{
$this->log('Container Multiple: Forwarding to '.get_class($this->current_container),AUTH_LOG_DEBUG);
return $this->current_container->checkAuthObserver($a_username, $a_auth);
}
return false;
}

+ Here is the call graph for this function:

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

Reimplemented from ilAuthContainerBase.

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

References AUTH_LOG_DEBUG, and Auth_Container\log().

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

+ Here is the call graph for this function:

ilAuthContainerMultiple::fetchData (   $user,
  $pass 
)

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

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().

{
foreach(ilAuthModeDetermination::_getInstance()->getAuthModeSequence() as $auth_mode)
{
if ($_REQUEST['force_mode_apache'])
{
$this->log('Container Apache: Trying new container',AUTH_LOG_DEBUG);
include_once './Services/AuthApache/classes/class.ilAuthContainerApache.php';
$this->current_container = new ilAuthContainerApache();
$auth = new ilAuthApache($this->current_container);
}
else
{
switch($auth_mode)
{
case AUTH_LDAP:
$this->log('Container LDAP: Trying new container',AUTH_LOG_DEBUG);
include_once './Services/LDAP/classes/class.ilAuthContainerLDAP.php';
$this->current_container = new ilAuthContainerLDAP();
break;
case AUTH_LOCAL:
$this->log('Container MDB2: Trying new container',AUTH_LOG_DEBUG);
include_once './Services/Database/classes/class.ilAuthContainerMDB2.php';
$this->current_container = new ilAuthContainerMDB2();
break;
case AUTH_SOAP:
$this->log('Container SOAP: Trying new container',AUTH_LOG_DEBUG);
include_once './Services/SOAPAuth/classes/class.ilAuthContainerSOAP.php';
$this->current_container = new ilAuthContainerSOAP();
break;
$this->log('Container Radius: Trying new container',AUTH_LOG_DEBUG);
include_once './Services/Radius/classes/class.ilAuthContainerRadius.php';
$this->current_container = new ilAuthContainerRadius();
break;
// begin-patch auth_plugin
default:
$this->log('Container Plugin: Trying new container',AUTH_LOG_DEBUG);
foreach(ilAuthUtils::getAuthPlugins() as $pl)
{
$container = $pl->getContainer($auth_mode);
if($container instanceof Auth_Container)
{
$this->current_container = $container;
break;
}
}
break;
// end-patch auth_plugin
}
}
$this->current_container->_auth_obj = $this->_auth_obj;
$result = $this->current_container->fetchData($user, $pass);
{
$this->log('Container '.$key.': '.$result->getMessage(), AUTH_LOG_ERR);
// Do not return here, otherwise wrong configured auth modes might block ilias database authentication
}
elseif ($result == true)
{
$this->log('Container '.$key.': Authentication successful.', AUTH_LOG_DEBUG);
return true;
}
else
{
$this->log('Container '.$key.': Authentication failed.', AUTH_LOG_DEBUG);
}
}
return false;
}

+ Here is the call graph for this function:

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

Reimplemented from ilAuthContainerBase.

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

References AUTH_LOG_DEBUG, and Auth_Container\log().

{
$this->log('Container Multiple: loginObserver'.get_class($this->current_container),AUTH_LOG_DEBUG);
// Forward to current container
if($this->current_container instanceof Auth_Container)
{
$this->log('Container Multiple: Forwarding to '.get_class($this->current_container),AUTH_LOG_DEBUG);
return $this->current_container->loginObserver($a_username, $a_auth);
}
return false;
}

+ Here is the call graph for this function:

ilAuthContainerMultiple::supportsCaptchaVerification ( )
Returns
bool

Reimplemented from ilAuthContainerBase.

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

{
return true;
}

Field Documentation

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: