Skip to content

Commit

Permalink
Graph: introduce GRAPH_URL and davmail.loginUrl in Settings
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@3587 3d1905a2-6b24-0410-a738-b14d5a86fcbd
  • Loading branch information
mguessan committed Jul 6, 2024
1 parent cfd1c09 commit 2938a7b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/java/davmail/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand All @@ -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+"/";
Expand Down

0 comments on commit 2938a7b

Please sign in to comment.