Public Member Functions | Protected Attributes | Private Member Functions

ilAuthMultiple Class Reference

Public Member Functions

 __construct ()
 Constructor.
 setIdle ($time, $add=false)
 set idle
 setExpire ($time, $add=false)
 set expire
 logout ()
 logout
 checkAuth ()
 check auth
 getUsername ()
 get username
 getAuth ()
 get auth
 start ()
 start
 getStatus ()
 get status

Protected Attributes

 $settings = null
 $auth = null
 $auth_modes = null
 $current_auth_modes = null
 $first_auth_method = true

Private Member Functions

 initNextAuthObject ()
 init next auth object

Detailed Description

Author:
Stefan Meyer <smeyer@databay.de>
Version:
$Id$

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


Constructor & Destructor Documentation

ilAuthMultiple::__construct (  ) 

Constructor.

public

Definition at line 49 of file class.ilAuthMultiple.php.

References ilAuthModeDetermination::_getInstance(), and initNextAuthObject().

        {
                include_once('./Services/Authentication/classes/class.ilAuthModeDetermination.php');
                $this->settings = ilAuthModeDetermination::_getInstance();
                
                $this->auth_modes = $this->settings->getAuthModeSequence();
                
                $this->initNextAuthObject();
                $this->first_auth_method = false;
        }

Here is the call graph for this function:


Member Function Documentation

ilAuthMultiple::checkAuth (  ) 

check auth

public

Parameters:
 

Definition at line 101 of file class.ilAuthMultiple.php.

References $ilLog, and initNextAuthObject().

Referenced by getAuth().

        {
                global $ilLog;
                
                do
                {
                        if($this->auth->checkAuth())
                        {
                                return true;
                        }
                        $this->auth->logout();
                        
                } 
                while($this->initNextAuthObject());
                
                $ilLog->write(__METHOD__.': Authentication failed.');
                return false;
        }

Here is the call graph for this function:

Here is the caller graph for this function:

ilAuthMultiple::getAuth (  ) 

get auth

public

Parameters:
 

Definition at line 139 of file class.ilAuthMultiple.php.

References checkAuth().

        {
                return $this->checkAuth();
        }

Here is the call graph for this function:

ilAuthMultiple::getStatus (  ) 

get status

public

Parameters:
 

Definition at line 162 of file class.ilAuthMultiple.php.

        {
                return $this->auth->getStatus();
        }

ilAuthMultiple::getUsername (  ) 

get username

public

Parameters:
 

Definition at line 127 of file class.ilAuthMultiple.php.

        {
                return $this->auth->getUsername();
        }

ilAuthMultiple::initNextAuthObject (  )  [private]

init next auth object

private

Parameters:
 

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

References $ilLog.

Referenced by __construct(), and checkAuth().

        {
                global $ilLog,$ilClientIniFile;
                
                if(!$this->current_auth_mode = current($this->auth_modes))
                {
                        return false;
                }
                next($this->auth_modes);
                switch($this->current_auth_mode)
                {
                        case AUTH_LDAP:
                                $ilLog->write(__METHOD__.': Current Authentication method is LDAP.');
                                include_once 'Services/LDAP/classes/class.ilAuthLDAP.php';
                                $this->auth = new ilAuthLDAP();
                                break;
                                
                        case AUTH_RADIUS:
                                $ilLog->write(__METHOD__.': Current Authentication method is RADIUS.');
                                include_once('Services/Radius/classes/class.ilAuthRadius.php');
                                $this->auth = new ilAuthRadius();
                                break;
                        case AUTH_LOCAL:
                                $ilLog->write(__METHOD__.': Current Authentication method is ILIAS DB.');
                                $auth_params = array(
                                                                                        'dsn'             => IL_DSN,
                                                                                        'table'       => $ilClientIniFile->readVariable("auth", "table"),
                                                                                        'usernamecol' => $ilClientIniFile->readVariable("auth", "usercol"),
                                                                                        'passwordcol' => $ilClientIniFile->readVariable("auth", "passcol")
                                                                                        );
                                $this->auth = new Auth("DB", $auth_params,"",false);
                                break;                          
                }
                if(!$this->first_auth_method)
                {
                        $this->auth->start();
                }
                return true;
        }

Here is the caller graph for this function:

ilAuthMultiple::logout (  ) 

logout

public

Parameters:
 

Definition at line 89 of file class.ilAuthMultiple.php.

        {
                $this->auth->logout();
        }

ilAuthMultiple::setExpire ( time,
add = false 
)

set expire

public

Definition at line 77 of file class.ilAuthMultiple.php.

        {
                $this->auth->setExpire($time,$add);
        }

ilAuthMultiple::setIdle ( time,
add = false 
)

set idle

public

Parameters:
 

Definition at line 67 of file class.ilAuthMultiple.php.

        {
                $this->auth->setIdle($time,$add);
        }

ilAuthMultiple::start (  ) 

start

public

Definition at line 150 of file class.ilAuthMultiple.php.

        {
                $this->auth->start();
        }


Field Documentation

ilAuthMultiple::$auth = null [protected]

Definition at line 38 of file class.ilAuthMultiple.php.

ilAuthMultiple::$auth_modes = null [protected]

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

ilAuthMultiple::$current_auth_modes = null [protected]

Definition at line 40 of file class.ilAuthMultiple.php.

ilAuthMultiple::$first_auth_method = true [protected]

Definition at line 41 of file class.ilAuthMultiple.php.

ilAuthMultiple::$settings = null [protected]

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


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