EWS: Override authentication mode test: EWS is never form based

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2219 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2014-01-29 23:03:48 +00:00
parent 882946775f
commit 0c6964ccd8
1 changed files with 16 additions and 0 deletions

View File

@ -141,6 +141,22 @@ public class EwsExchangeSession extends ExchangeSession {
super(url, userName, password);
}
/**
* Override authentication mode test: EWS is never form based.
*
* @param url exchange base URL
* @param httpClient httpClient instance
* @return true if basic authentication detected
*/
@Override
protected boolean isBasicAuthentication(HttpClient httpClient, String url) {
if (url.toLowerCase().endsWith("/ews/exchange.asmx")) {
return false;
} else {
return super.isBasicAuthentication(httpClient, url);
}
}
@Override
protected HttpMethod formLogin(HttpClient httpClient, HttpMethod initmethod, String userName, String password) throws IOException {
LOGGER.debug("Form based authentication detected");