Scalr\Service\CloudStack\CloudStack::login PHP Метод

login() публичный Метод

Successful login attempt will generate a JSESSIONID cookie value that can be passed in subsequent Query command calls until the "logout" command has been issued or the session has expired.
public login ( string $userName, string $password, string $domain = null ) : Scalr\Service\CloudStack\DataType\LoginResponseData
$userName string Username
$password string Password
$domain string path of the domain that the user belongs to. Example: domain=/com/cloud/internal. If no domain is passed in, the ROOT domain is assumed.
Результат Scalr\Service\CloudStack\DataType\LoginResponseData
    public function login($userName, $password, $domain = null)
    {
        $result = null;
        $response = $this->getClient()->call('login', array('username' => $this->escape($userName), 'password' => $this->escape($password), 'domain' => $this->escape($domain)));
        if ($response->hasError() === false) {
            $resultObject = $response->getResult();
            if (!empty($resultObject)) {
                $result = $this->_loadLoginData($resultObject);
            }
        }
        return $result;
    }