Public Member Functions | Data Fields

ilSoapAuthentication Class Reference

Inheritance diagram for ilSoapAuthentication:
Collaboration diagram for ilSoapAuthentication:

Public Member Functions

 ilSoapAuthentication ()
 disableSoapCheck ()
 authenticate ()
 validateSession ()
 __checkSOAPEnabled ()
 __checkClientEnabled ()

Data Fields

 $soap_check = true

Detailed Description

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


Member Function Documentation

ilSoapAuthentication::__checkClientEnabled (  ) 

Definition at line 171 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 (  ) 

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

References $query, and $res.

Referenced by authenticate(), and validateSession().

        {
                include_once './classes/class.ilDBx.php';


                $db =& new ilDBx($this->dsn);

                $query = "SELECT * FROM settings 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(), __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;
                }
                if(!$this->__setSessionSaveHandler())
                {
                        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 ilBaseAuthentication::__setMessageCode(), and ilBaseAuthentication::ilBaseAuthentication().

        {
                // First unset all cookie inforamtions
                unset($_COOKIE['PHPSESSID']);

                parent::ilBaseAuthentication();
                $this->__setMessageCode('Client');
        }

Here is the call graph for this function:

ilSoapAuthentication::validateSession (  ) 

Reimplemented from ilBaseAuthentication.

Definition at line 106 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;
                }
                
                if(!$this->__setSessionSaveHandler())
                {
                        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->__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: