private function auth($db, $username, $password, array $array = [])
    {
        //Prepare urls for different clients
        $urlCommon = $this->setApiEndPoint($this->commonEndPoint);
        $urlActions = $this->setApiEndPoint($this->objectEndPoint);

        //Assign clients by type
        $this->common = $this->getClient($urlCommon);
        $this->object = $this->getClient($urlActions);

        $this->uid = $this->common->authenticate($db, $username, $password, $array);

        if (!is_int($this->uid)) {
            if (is_array($this->uid) && array_key_exists('faultCode', $this->uid))
                throw new OdooException($this->uid['faultCode']);
            else
                throw new OdooException('Unsuccessful Authorization');
        }

    }
private function auth($db, $username, $password, array $array = [])
    {
        //Prepare urls for different clients
        $urlCommon = $this->setApiEndPoint($this->commonEndPoint);
        $urlActions = $this->setApiEndPoint($this->objectEndPoint);

        //Assign clients by type
        $this->common = $this->getClient($urlCommon);
        $this->object = $this->getClient($urlActions);

        $this->uid = $this->common->authenticate($db, $username, $password, $array);

        if (!is_int($this->uid)) {
            if (is_array($this->uid) && array_key_exists('faultCode', $this->uid))
                throw new OdooException($this->uid['faultCode']);
            else
                throw new OdooException('Unsuccessful Authorization');
        }

    }
private function auth ( $ db , $ username , $ password , array $ array = [ ] ) { //Prepare urls for different clients $ urlCommon = $ this -> setApiEndPoint ( $ this -> commonEndPoint ) ; $ urlActions = $ this -> setApiEndPoint ( $ this -> objectEndPoint ) ; //Assign clients by type $ this -> common = $ this -> getClient ( $ urlCommon ) ; $ this -> object = $ this -> getClient ( $ urlActions ) ; $ this -> uid = $ this -> common -> authenticate ( $ db , $ username , $ password , $ array ) ; if ( ! is_int ( $ this -> uid ) ) { if ( is_array ( $ this -> uid ) && array_key_exists ( 'faultCode' , $ this -> uid ) ) throw new OdooException ( $ this -> uid [ 'faultCode' ] ) ; else throw new OdooException ( 'Unsuccessful Authorization' ) ; } }
Authenticate into Odoo ERP.

@param $db
@param $username
@param $password
@param array $array
@throws OdooException
Authenticate into Odoo ERP .