From 2938a7bc37c280fe072c235914bb8e644d9a18d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Guessant?= Date: Sat, 6 Jul 2024 15:38:35 +0000 Subject: [PATCH] Graph: introduce GRAPH_URL and davmail.loginUrl in Settings git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@3587 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/Settings.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/java/davmail/Settings.java b/src/java/davmail/Settings.java index 358b66a9..7adf1ed3 100644 --- a/src/java/davmail/Settings.java +++ b/src/java/davmail/Settings.java @@ -43,6 +43,9 @@ public final class Settings { public static final String OUTLOOK_URL = "https://outlook.office365.com"; public static final String O365_URL = OUTLOOK_URL+"/EWS/Exchange.asmx"; + + public static final String GRAPH_URL = "https://graph.microsoft.com"; + public static final String O365_LOGIN_URL = "https://login.microsoftonline.com/"; public static final String O365 = "O365"; @@ -742,7 +745,10 @@ public static String getUserAgent() { public static String getO365Url() { String tld = getProperty("davmail.tld"); - if (tld == null) { + String outlookUrl = getProperty("davmail.outlookUrl"); + if (outlookUrl != null) { + return outlookUrl; + } else if (tld == null) { return O365_URL; } else { return "https://outlook.office365."+tld+"/EWS/Exchange.asmx"; @@ -751,7 +757,10 @@ public static String getO365Url() { public static String getO365LoginUrl() { String tld = getProperty("davmail.tld"); - if (tld == null) { + String loginUrl = getProperty("davmail.loginUrl"); + if (loginUrl != null) { + return loginUrl; + } else if (tld == null) { return O365_LOGIN_URL; } else { return "https://login.microsoftonline."+tld+"/";