soap-api
soap-api copied to clipboard
Auth request shouldn't send old authToken
When sending Auth request, the header with authToken is added (if set). With long running process it sometimes triggers "auth credentials have expired" error. My quick&dirty patch for this:
--- src/Zimbra/Soap/Client/Http.php.org
+++ src/Zimbra/Soap/Client/Http.php
@@ -237,7 +237,7 @@
public function doRequest(SoapRequest $request)
{
$this->soapMessage = new SoapMessage;
- if(!empty($this->_authToken))
+ if(!empty($this->_authToken) && !($request instanceof \Zimbra\Admin\Request\Auth))
{
$this->soapMessage->addHeader('authToken', $this->_authToken);
}