Skip to content

Commit

Permalink
O365: Merge #236 Changed authentication link log level
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@3478 3d1905a2-6b24-0410-a738-b14d5a86fcbd
  • Loading branch information
mguessan committed Nov 12, 2023
1 parent 496808e commit 1426b2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/java/davmail/exchange/auth/O365Authenticator.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ public void authenticate() throws IOException {
// extract response
config = extractConfig(logonMethod.getResponseBodyAsString());
if (config.optJSONArray("arrScopes") != null || config.optJSONArray("urlPostRedirect") != null) {
LOGGER.debug("Authentication successful but user consent or validation needed, please open the following url in a browser");
LOGGER.debug(url);
LOGGER.warn("Authentication successful but user consent or validation needed, please open the following url in a browser");
LOGGER.warn(url);
throw new DavMailAuthenticationException("EXCEPTION_AUTHENTICATION_FAILED");
} else if (config.optString("strServiceExceptionMessage") != null) {
LOGGER.debug("O365 returned error: " + config.optString("strServiceExceptionMessage"));
Expand Down Expand Up @@ -304,8 +304,8 @@ private String authenticateADFS(HttpClientAdapter httpClientAdapter, String resp
if (targetMethod.getStatusCode() == HttpStatus.SC_OK) {
JSONObject config = extractConfig(responseBodyAsString);
if (config.optJSONArray("arrScopes") != null || config.optJSONArray("urlPostRedirect") != null) {
LOGGER.debug("Authentication successful but user consent or validation needed, please open the following url in a browser");
LOGGER.debug(authorizeUrl);
LOGGER.warn("Authentication successful but user consent or validation needed, please open the following url in a browser");
LOGGER.warn(authorizeUrl);
throw new DavMailAuthenticationException("EXCEPTION_AUTHENTICATION_FAILED");
}
} else if (targetMethod.getStatusCode() != HttpStatus.SC_MOVED_TEMPORARILY || location == null) {
Expand Down

0 comments on commit 1426b2b

Please sign in to comment.