private function authenticate()
    {
        $try = 0;

        while (true) {
            $try++;

            try {
                $response = $this->soapClient->__soapCall('GetAuthenticationToken', array(array(
                    'authenticationRequest' => $this->authenticationRequest->toArray(),
                )));

                return new AuthenticationTokenResponse(new \DateTime($response->GetAuthenticationTokenResult->DeprecatedDate), $response->GetAuthenticationTokenResult->Key);
            } catch (\SoapFault $e) {
                if (null !== $this->logger) {
                    $this->logger->critical(sprintf('[%] %s', __CLASS__, $e->getMessage()));
                }

                if ($try >= $this->retries) {
                    throw $e;
                }

                // waiting 500ms before next call
                usleep(500000);
            }
        }
    }