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

Public Member Functions

 ilSoapAuthentication ()
 disableSoapCheck ()
 authenticate ()
 validateSession ()
 __checkSOAPEnabled ()
 Check given session id.
 __checkClientEnabled ()
- Public Member Functions inherited from ilBaseAuthentication
 ilBaseAuthentication ()
 setClient ($a_client)
 getClient ()
 setUsername ($a_username)
 getUsername ()
 setPassword ($a_password)
 getPassword ()
 setSid ($a_sid)
 getSid ()
 getMessage ()
 getMessageCode ()
 __setMessage ($a_message)
 __setMessageCode ($a_message_code)
 setPasswordType ($a_type)
 getPasswordType ()
 start ()
 logout ()
 __buildDSN ()
 __buildAuth ()
 __setSessionSaveHandler ()
 __getAuthStatus ()

Data Fields

 $soap_check = true
- Data Fields inherited from ilBaseAuthentication
 $auth = null
 $sid = ''
 $username = ''
 $password = ''
 $client = ''

Protected Member Functions

 __checkAgreement ($a_auth_mode)
 Check if user agreement is accepted.

Detailed Description

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

Member Function Documentation

ilSoapAuthentication::__checkAgreement (   $a_auth_mode)
protected

Check if user agreement is accepted.

protected

Parameters
stringauth_mode local,ldap or cas

Definition at line 117 of file class.ilSoapAuthentication.php.

References $GLOBALS, $ilDB, $login, ilBaseAuthentication\__setMessage(), ilObjUser\_checkExternalAuthAccount(), ilObjUser\_hasAcceptedAgreement(), and ilBaseAuthentication\getUsername().

Referenced by authenticate().

{
global $ilDB;
include_once('./Services/User/classes/class.ilObjUser.php');
include_once('./Services/Administration/classes/class.ilSetting.php');
$GLOBALS['ilSetting'] = new ilSetting();
{
// User does not exist
return true;
}
{
$this->__setMessage('User agreement no accepted.');
return false;
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilSoapAuthentication::__checkClientEnabled ( )

Definition at line 237 of file class.ilSoapAuthentication.php.

Referenced by validateSession().

{
if(is_object($this->ini) and $this->ini->readVariable('client','access'))
{
return true;
}
return false;
}

+ Here is the caller graph for this function:

ilSoapAuthentication::__checkSOAPEnabled ( )

Check given session id.

Parameters
@return

Definition at line 217 of file class.ilSoapAuthentication.php.

References $GLOBALS, and $ilDB.

Referenced by authenticate(), and validateSession().

{
include_once './Services/Database/classes/class.ilDB.php';
//$db =& new ilDB($this->dsn);
$ilDB = $this->db;
$ilDB->connect();
$GLOBALS["ilDB"] = $ilDB;
include_once './Services/Administration/classes/class.ilSetting.php';
$set = new ilSetting();
return ($set->get("soap_user_administration") == 1);
/*$query = "SELECT * FROM set tings WHERE keyword = 'soap_user_administration' AND value = 1";
$res = $db->query($query);
return $res->numRows() ? true : false;*/
}

+ Here is the caller graph for this function:

ilSoapAuthentication::authenticate ( )

Reimplemented from ilBaseAuthentication.

Definition at line 55 of file class.ilSoapAuthentication.php.

References ilBaseAuthentication\__buildAuth(), ilBaseAuthentication\__buildDSN(), __checkAgreement(), __checkSOAPEnabled(), ilBaseAuthentication\__getAuthStatus(), ilBaseAuthentication\__setMessage(), ilBaseAuthentication\__setMessageCode(), ilBaseAuthentication\__setSessionSaveHandler(), ilBaseAuthentication\getClient(), ilBaseAuthentication\getUsername(), and ilBaseAuthentication\setSid().

{
if(!$this->getClient())
{
$this->__setMessage('No client given');
return false;
}
if(!$this->getUsername())
{
$this->__setMessage('No username given');
return false;
}
// Read ilias ini
if(!$this->__buildDSN())
{
$this->__setMessage('Error building dsn/Wrong client Id?');
return false;
}
{
return false;
}
if(!$this->__checkAgreement('local'))
{
return false;
}
if(!$this->__buildAuth())
{
return false;
}
if($this->soap_check and !$this->__checkSOAPEnabled())
{
$this->__setMessage('SOAP is not enabled in ILIAS administration for this client');
$this->__setMessageCode('Server');
return false;
}
$this->auth->start();
if(!$this->auth->getAuth())
{
$this->__getAuthStatus();
return false;
}
$this->setSid(session_id());
return true;
}

+ Here is the call graph for this function:

ilSoapAuthentication::disableSoapCheck ( )

Definition at line 50 of file class.ilSoapAuthentication.php.

{
$this->soap_check = false;
}
ilSoapAuthentication::ilSoapAuthentication ( )

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

References $_COOKIE, ilBaseAuthentication\__setMessageCode(), and ilBaseAuthentication\ilBaseAuthentication().

{
// First unset all cookie inforamtions
unset($_COOKIE['PHPSESSID']);
$this->__setMessageCode('Client');
}

+ Here is the call graph for this function:

ilSoapAuthentication::validateSession ( )

Reimplemented from ilBaseAuthentication.

Definition at line 142 of file class.ilSoapAuthentication.php.

References ilBaseAuthentication\__buildAuth(), ilBaseAuthentication\__buildDSN(), __checkClientEnabled(), __checkSOAPEnabled(), ilBaseAuthentication\__setMessage(), ilBaseAuthentication\__setMessageCode(), ilBaseAuthentication\__setSessionSaveHandler(), ilBaseAuthentication\getClient(), and ilBaseAuthentication\getSid().

{
if(!$this->getClient())
{
$this->__setMessage('No client given');
return false;
}
if(!$this->getSid())
{
$this->__setMessage('No session id given');
return false;
}
if(!$this->__buildDSN())
{
$this->__setMessage('Error building dsn');
return false;
}
if(!$this->__checkClientEnabled())
{
$this->__setMessage('Client disabled.');
return false;
}
{
return false;
}
if(!$this->__buildAuth())
{
return false;
}
/* if (!$this->__checkGivenSessionId())
{
$this->__setMessage('Unknown session id.');
session_regenerate_id();
return false;
}*/
if($this->soap_check and !$this->__checkSOAPEnabled())
{
$this->__setMessage('SOAP is not enabled in ILIAS administration for this client');
$this->__setMessageCode('Server');
return false;
}
$this->auth->start();
if(!$this->auth->getAuth())
{
$this->__setMessage('Session not valid');
return false;
}
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilSoapAuthentication::$soap_check = true

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


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