Scalr\Service\Azure::validateTenantName PHP Method

validateTenantName() public method

Validate tenant name.
public validateTenantName ( ) : boolean
return boolean Return true, if tenantName is valid, else return false
    public function validateTenantName()
    {
        $path = '/' . $this->tenantName . '/.well-known/openid-configuration';
        $request = $this->getClient()->prepareRequest($path, 'GET', self::AUTH_API_VERSION, self::URL_LOGIN_WINDOWS);
        $response = $this->getClient()->call($request);
        if (200 == $response->getResponseCode()) {
            $this->tenantIsValid = true;
        } else {
            $this->tenantIsValid = false;
        }
        return $this->tenantIsValid;
    }