[Commits] [SCM] claws branch, gtk2, updated. 3.20.0-69-g2732b32bd
jonathan at claws-mail.org
jonathan at claws-mail.org
Sun Mar 24 16:45:44 UTC 2024
The branch, gtk2 has been updated
via 2732b32bd3a51f0addece93704ed6b4ad97b18fb (commit)
from 21f26bcd2f2ccfac6ad855b5d3770cd116a0982f (commit)
Summary of changes:
src/oauth2.c | 24 +++++++++++++++++++++---
src/oauth2.h | 1 +
src/pop.c | 3 ++-
src/prefs_account.c | 1 +
4 files changed, 25 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 2732b32bd3a51f0addece93704ed6b4ad97b18fb
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date: Sun Mar 24 02:39:59 2024 -0700
Add OAUTH2 support for Microsoft 365 GCC High
diff --git a/src/oauth2.c b/src/oauth2.c
index 3a34dc0be..1a123577f 100644
--- a/src/oauth2.c
+++ b/src/oauth2.c
@@ -47,7 +47,7 @@
//Yahoo requires token requests to send POST header Authorization: Basic
//where the password is Base64 encoding of client_id:client_secret
-static gchar *OAUTH2info[4][17]={
+static gchar *OAUTH2info[5][17]={
{"accounts.google.com",
"",
".",
@@ -99,7 +99,24 @@ static gchar *OAUTH2info[4][17]={
"offline_access https://outlook.office.com/IMAP.AccessAsUser.All https://outlook.office.com/POP.AccessAsUser.All https://outlook.office.com/SMTP.Send",
"query",
""},
- {"api.login.yahoo.com",
+ {"login.microsoftonline.us",
+ "",
+ "",
+ "http://127.0.0.1:8888",
+ "/common/oauth2/v2.0/authorize",
+ "/common/oauth2/v2.0/token",
+ "/common/oauth2/v2.0/token",
+ "code",
+ "offline_access https://outlook.office365.us/IMAP.AccessAsUser.All https://outlook.office365.us/POP.AccessAsUser.All https://outlook.office365.us/SMTP.Send",
+ "authorization_code",
+ "refresh_token",
+ "common",
+ "",
+ "offline",
+ "offline_access https://outlook.office365.us/IMAP.AccessAsUser.All https://outlook.office365.us/POP.AccessAsUser.All https://outlook.office365.us/SMTP.Send",
+ "query",
+ ""},
+ {"api.login.yahoo.com",
"",
".",
"oob",
@@ -118,11 +135,12 @@ static gchar *OAUTH2info[4][17]={
"1"}
};
-static gchar *OAUTH2CodeMarker[5][2] = {
+static gchar *OAUTH2CodeMarker[6][2] = {
{"",""},
{"code=","&scope="},
{"code="," HTTP"},
{"code=","&session_state="},
+ {"code=","&session_state="},
{"yahoo_begin_mark","yahoo_end_mark"} /* Not used since token avalable to user to copy in browser window */
};
diff --git a/src/oauth2.h b/src/oauth2.h
index 51eb60dcf..d4a5d9378 100644
--- a/src/oauth2.h
+++ b/src/oauth2.h
@@ -59,6 +59,7 @@ typedef enum
OAUTH2AUTH_GOOGLE,
OAUTH2AUTH_OUTLOOK,
OAUTH2AUTH_EXCHANGE,
+ OAUTH2AUTH_MICROSOFT_GCCHIGH,
OAUTH2AUTH_YAHOO,
OAUTH2AUTH_LAST = OAUTH2AUTH_YAHOO
} Oauth2Service;
diff --git a/src/pop.c b/src/pop.c
index 695f5a072..e06a142e2 100644
--- a/src/pop.c
+++ b/src/pop.c
@@ -245,7 +245,8 @@ static gint pop3_getauth_oauth2_send(Pop3Session *session)
{
gint oauth2_provider = session->ac_prefs->oauth2_provider;
return ( oauth2_provider == OAUTH2AUTH_OUTLOOK ||
- oauth2_provider == OAUTH2AUTH_EXCHANGE
+ oauth2_provider == OAUTH2AUTH_EXCHANGE ||
+ oauth2_provider == OAUTH2AUTH_MICROSOFT_GCCHIGH
? pop3_getauth_oauth2_send_microsoft_1(session)
: pop3_getauth_oauth2_send_generic(session)
);
diff --git a/src/prefs_account.c b/src/prefs_account.c
index 0b7312091..0163c597e 100644
--- a/src/prefs_account.c
+++ b/src/prefs_account.c
@@ -2322,6 +2322,7 @@ static void oauth2_create_widget_func(PrefsPage * _page,
COMBOBOX_ADD (menu, "Google/Gmail", OAUTH2AUTH_GOOGLE);
COMBOBOX_ADD (menu, "MS Outlook", OAUTH2AUTH_OUTLOOK);
COMBOBOX_ADD (menu, "MS Exchange", OAUTH2AUTH_EXCHANGE);
+ COMBOBOX_ADD (menu, "MS 365 GCC High", OAUTH2AUTH_MICROSOFT_GCCHIGH);
COMBOBOX_ADD (menu, "Yahoo", OAUTH2AUTH_YAHOO);
protocol_optmenu = g_new(struct BasicProtocol, 1);
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list