[evolution-ews/wip/mcrha/office365] Move OAuth2 specific code from EWS to Office365



commit c6775f468d90647927b6a7cc307083d59deba636
Author: Milan Crha <mcrha redhat com>
Date:   Wed Jun 3 18:02:08 2020 +0200

    Move OAuth2 specific code from EWS to Office365

 po/POTFILES.in                                     |  5 +-
 .../addressbook/e-book-backend-o365-factory.c      |  3 +
 .../calendar/e-cal-backend-o365-factory.c          |  2 +
 src/Office365/camel/camel-o365-provider.c          |  4 ++
 src/Office365/common/CMakeLists.txt                |  4 ++
 .../common}/camel-sasl-xoauth2-office365.c         |  0
 .../common}/camel-sasl-xoauth2-office365.h         |  0
 .../common}/e-oauth2-service-office365.c           | 81 +++++++++++++---------
 .../common}/e-oauth2-service-office365.h           |  0
 .../evolution/module-o365-configuration.c          |  8 ++-
 src/Office365/registry/module-o365-backend.c       |  5 +-
 src/addressbook/e-book-backend-ews-factory.c       |  2 -
 src/calendar/e-cal-backend-ews-factory.c           |  2 -
 src/camel/camel-ews-provider.c                     |  4 --
 src/collection/module-ews-backend.c                |  2 -
 src/configuration/module-ews-configuration.c       | 10 +--
 src/server/CMakeLists.txt                          |  4 --
 17 files changed, 76 insertions(+), 60 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index fd153dd1..2ca8abb5 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -27,10 +27,11 @@ src/configuration/e-mail-config-ews-folder-sizes-page.c
 src/configuration/e-mail-config-ews-gal.c
 src/configuration/e-mail-config-ews-ooo-page.c
 src/configuration/module-ews-configuration.error.xml
-src/server/camel-sasl-xoauth2-office365.c
 src/server/e-ews-calendar-utils.c
 src/server/e-ews-camel-common.c
 src/server/e-ews-connection.c
 src/server/e-ews-connection-utils.c
 src/server/e-ews-folder.c
-src/server/e-oauth2-service-office365.c
+src/Office365/camel/camel-o365-provider.c
+src/Office365/common/camel-sasl-xoauth2-office365.c
+src/Office365/common/e-oauth2-service-office365.c
diff --git a/src/Office365/addressbook/e-book-backend-o365-factory.c 
b/src/Office365/addressbook/e-book-backend-o365-factory.c
index 767351ba..b5b5f9b8 100644
--- a/src/Office365/addressbook/e-book-backend-o365-factory.c
+++ b/src/Office365/addressbook/e-book-backend-o365-factory.c
@@ -21,6 +21,7 @@
 
 #include <libedata-book/libedata-book.h>
 
+#include "common/e-oauth2-service-office365.h"
 #include "common/e-source-o365-folder.h"
 
 #include "e-book-backend-o365.h"
@@ -70,7 +71,9 @@ e_module_load (GTypeModule *type_module)
 
        e_module = E_MODULE (type_module);
 
+       e_oauth2_service_office365_type_register (type_module);
        e_source_o365_folder_type_register (type_module);
+
        e_book_backend_o365_factory_register_type (type_module);
 }
 
diff --git a/src/Office365/calendar/e-cal-backend-o365-factory.c 
b/src/Office365/calendar/e-cal-backend-o365-factory.c
index 83710795..3711559b 100644
--- a/src/Office365/calendar/e-cal-backend-o365-factory.c
+++ b/src/Office365/calendar/e-cal-backend-o365-factory.c
@@ -22,6 +22,7 @@
 
 #include <libedata-cal/libedata-cal.h>
 
+#include "common/e-oauth2-service-office365.h"
 #include "common/e-source-o365-folder.h"
 
 #include "e-cal-backend-o365.h"
@@ -143,6 +144,7 @@ e_module_load (GTypeModule *type_module)
 
        e_module = E_MODULE (type_module);
 
+       e_oauth2_service_office365_type_register (type_module);
        e_source_o365_folder_type_register (type_module);
 
        e_cal_backend_o365_events_factory_register_type (type_module);
diff --git a/src/Office365/camel/camel-o365-provider.c b/src/Office365/camel/camel-o365-provider.c
index d57614af..4d42af0f 100644
--- a/src/Office365/camel/camel-o365-provider.c
+++ b/src/Office365/camel/camel-o365-provider.c
@@ -22,6 +22,8 @@
 #include <glib/gi18n-lib.h>
 #include <gmodule.h>
 
+#include "common/camel-sasl-xoauth2-office365.h"
+
 #include "camel-o365-store.h"
 #include "camel-o365-transport.h"
 
@@ -91,6 +93,8 @@ camel_provider_module_init (void)
        o365_provider.object_types[CAMEL_PROVIDER_STORE] =  CAMEL_TYPE_O365_STORE;
        o365_provider.object_types[CAMEL_PROVIDER_TRANSPORT] = CAMEL_TYPE_O365_TRANSPORT;
 
+       g_type_ensure (CAMEL_TYPE_SASL_XOAUTH2_OFFICE365);
+
        camel_provider_register (&o365_provider);
 }
 
diff --git a/src/Office365/common/CMakeLists.txt b/src/Office365/common/CMakeLists.txt
index ff271000..25df535d 100644
--- a/src/Office365/common/CMakeLists.txt
+++ b/src/Office365/common/CMakeLists.txt
@@ -1,6 +1,10 @@
 set(SOURCES
+       camel-sasl-xoauth2-office365.c
+       camel-sasl-xoauth2-office365.h
        camel-o365-settings.c
        camel-o365-settings.h
+       e-oauth2-service-office365.c
+       e-oauth2-service-office365.h
        e-source-o365-folder.c
        e-source-o365-folder.h
 )
diff --git a/src/server/camel-sasl-xoauth2-office365.c b/src/Office365/common/camel-sasl-xoauth2-office365.c
similarity index 100%
rename from src/server/camel-sasl-xoauth2-office365.c
rename to src/Office365/common/camel-sasl-xoauth2-office365.c
diff --git a/src/server/camel-sasl-xoauth2-office365.h b/src/Office365/common/camel-sasl-xoauth2-office365.h
similarity index 100%
rename from src/server/camel-sasl-xoauth2-office365.h
rename to src/Office365/common/camel-sasl-xoauth2-office365.h
diff --git a/src/server/e-oauth2-service-office365.c b/src/Office365/common/e-oauth2-service-office365.c
similarity index 80%
rename from src/server/e-oauth2-service-office365.c
rename to src/Office365/common/e-oauth2-service-office365.c
index d660458c..aaf28744 100644
--- a/src/server/e-oauth2-service-office365.c
+++ b/src/Office365/common/e-oauth2-service-office365.c
@@ -19,16 +19,30 @@
 #include <glib/gi18n-lib.h>
 #include <libedataserver/libedataserver.h>
 
-#include "server/camel-ews-settings.h"
+#include "camel-o365-settings.h"
 
 #include "e-oauth2-service-office365.h"
 
 /* https://portal.azure.com/
+   https://docs.microsoft.com/en-us/graph/auth/
+
    https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-developers-guide
    https://tsmatz.wordpress.com/2016/10/07/application-permission-with-v2-endpoint-and-microsoft-graph/
 */
 
-#define OFFICE365_RESOURCE "https://outlook.office.com";
+#define OFFICE365_SCOPE        "Calendars.ReadWrite " \
+                       "Calendars.ReadWrite.Shared " \
+                       "Contacts.ReadWrite " \
+                       "Contacts.ReadWrite.Shared " \
+                       "Mail.ReadWrite " \
+                       "Mail.ReadWrite.Shared " \
+                       "Mail.Send " \
+                       "Mail.Send.Shared " \
+                       "Notes.Create " \
+                       "Notes.ReadWrite.All " \
+                       "offline_access " \
+                       "Tasks.ReadWrite " \
+                       "Tasks.ReadWrite.Shared "
 
 struct _EOAuth2ServiceOffice365Private
 {
@@ -40,7 +54,8 @@ struct _EOAuth2ServiceOffice365Private
 static void e_oauth2_service_office365_oauth2_service_init (EOAuth2ServiceInterface *iface);
 
 G_DEFINE_DYNAMIC_TYPE_EXTENDED (EOAuth2ServiceOffice365, e_oauth2_service_office365, 
E_TYPE_OAUTH2_SERVICE_BASE, 0,
-       G_IMPLEMENT_INTERFACE_DYNAMIC (E_TYPE_OAUTH2_SERVICE, e_oauth2_service_office365_oauth2_service_init))
+       G_IMPLEMENT_INTERFACE_DYNAMIC (E_TYPE_OAUTH2_SERVICE, e_oauth2_service_office365_oauth2_service_init)
+       G_ADD_PRIVATE_DYNAMIC (EOAuth2ServiceOffice365))
 
 static const gchar *
 eos_office365_cache_string (EOAuth2ServiceOffice365 *oauth2_office365,
@@ -71,7 +86,7 @@ eos_office365_cache_string (EOAuth2ServiceOffice365 *oauth2_office365,
        return cached_str;
 }
 
-static CamelEwsSettings *
+static CamelO365Settings *
 eos_office365_get_camel_settings (ESource *source)
 {
        ESourceCamel *extension;
@@ -81,9 +96,9 @@ eos_office365_get_camel_settings (ESource *source)
 
        g_return_val_if_fail (E_IS_SOURCE (source), NULL);
 
-       extension = e_source_get_extension (source, e_source_camel_get_extension_name ("ews"));
+       extension = e_source_get_extension (source, e_source_camel_get_extension_name ("office365"));
 
-       return CAMEL_EWS_SETTINGS (e_source_camel_get_settings (extension));
+       return CAMEL_O365_SETTINGS (e_source_camel_get_settings (extension));
 }
 
 static gboolean
@@ -92,8 +107,7 @@ eos_office365_guess_can_process (EOAuth2Service *service,
                                 const gchar *hostname)
 {
        return e_oauth2_services_is_supported () &&
-               protocol && g_ascii_strcasecmp (protocol, "ews") == 0 &&
-               hostname && e_util_utf8_strstrcase (hostname, "outlook.office365.com");
+               protocol && g_ascii_strcasecmp (protocol, "office365") == 0;
 }
 
 static const gchar *
@@ -114,11 +128,11 @@ eos_office365_get_client_id (EOAuth2Service *service,
                             ESource *source)
 {
        EOAuth2ServiceOffice365 *oauth2_office365 = E_OAUTH2_SERVICE_OFFICE365 (service);
-       CamelEwsSettings *ews_settings;
+       CamelO365Settings *o365_settings;
 
-       ews_settings = eos_office365_get_camel_settings (source);
-       if (ews_settings && camel_ews_settings_get_override_oauth2 (ews_settings)) {
-               gchar *client_id = camel_ews_settings_dup_oauth2_client_id (ews_settings);
+       o365_settings = eos_office365_get_camel_settings (source);
+       if (o365_settings && camel_o365_settings_get_override_oauth2 (o365_settings)) {
+               gchar *client_id = camel_o365_settings_dup_oauth2_client_id (o365_settings);
 
                if (client_id && !*client_id) {
                        g_free (client_id);
@@ -144,21 +158,21 @@ eos_office365_get_authentication_uri (EOAuth2Service *service,
                                      ESource *source)
 {
        EOAuth2ServiceOffice365 *oauth2_office365 = E_OAUTH2_SERVICE_OFFICE365 (service);
-       CamelEwsSettings *ews_settings;
+       CamelO365Settings *o365_settings;
 
-       ews_settings = eos_office365_get_camel_settings (source);
-       if (ews_settings && camel_ews_settings_get_override_oauth2 (ews_settings)) {
+       o365_settings = eos_office365_get_camel_settings (source);
+       if (o365_settings && camel_o365_settings_get_override_oauth2 (o365_settings)) {
                gchar *tenant;
                const gchar *res;
 
-               tenant = camel_ews_settings_dup_oauth2_tenant (ews_settings);
+               tenant = camel_o365_settings_dup_oauth2_tenant (o365_settings);
                if (tenant && !*tenant) {
                        g_free (tenant);
                        tenant = NULL;
                }
 
                res = eos_office365_cache_string (oauth2_office365,
-                       g_strdup_printf ("https://login.microsoftonline.com/%s/oauth2/authorize";,
+                       g_strdup_printf ("https://login.microsoftonline.com/%s/oauth2/v2.0/authorize";,
                                tenant ? tenant : OFFICE365_TENANT));
 
                g_free (tenant);
@@ -166,7 +180,7 @@ eos_office365_get_authentication_uri (EOAuth2Service *service,
                return res;
        }
 
-       return "https://login.microsoftonline.com/"; OFFICE365_TENANT "/oauth2/authorize";
+       return "https://login.microsoftonline.com/"; OFFICE365_TENANT "/oauth2/v2.0/authorize";
 }
 
 static const gchar *
@@ -174,21 +188,21 @@ eos_office365_get_refresh_uri (EOAuth2Service *service,
                               ESource *source)
 {
        EOAuth2ServiceOffice365 *oauth2_office365 = E_OAUTH2_SERVICE_OFFICE365 (service);
-       CamelEwsSettings *ews_settings;
+       CamelO365Settings *o365_settings;
 
-       ews_settings = eos_office365_get_camel_settings (source);
-       if (ews_settings && camel_ews_settings_get_override_oauth2 (ews_settings)) {
+       o365_settings = eos_office365_get_camel_settings (source);
+       if (o365_settings && camel_o365_settings_get_override_oauth2 (o365_settings)) {
                gchar *tenant;
                const gchar *res;
 
-               tenant = camel_ews_settings_dup_oauth2_tenant (ews_settings);
+               tenant = camel_o365_settings_dup_oauth2_tenant (o365_settings);
                if (tenant && !*tenant) {
                        g_free (tenant);
                        tenant = NULL;
                }
 
                res = eos_office365_cache_string (oauth2_office365,
-                       g_strdup_printf ("https://login.microsoftonline.com/%s/oauth2/token";,
+                       g_strdup_printf ("https://login.microsoftonline.com/%s/oauth2/v2.0/token";,
                                tenant ? tenant : OFFICE365_TENANT));
 
                g_free (tenant);
@@ -196,7 +210,7 @@ eos_office365_get_refresh_uri (EOAuth2Service *service,
                return res;
        }
 
-       return "https://login.microsoftonline.com/"; OFFICE365_TENANT "/oauth2/token";
+       return "https://login.microsoftonline.com/"; OFFICE365_TENANT "/oauth2/v2.0/token";
 }
 
 static const gchar *
@@ -204,14 +218,14 @@ eos_office365_get_redirect_uri (EOAuth2Service *service,
                                ESource *source)
 {
        EOAuth2ServiceOffice365 *oauth2_office365 = E_OAUTH2_SERVICE_OFFICE365 (service);
-       CamelEwsSettings *ews_settings;
+       CamelO365Settings *o365_settings;
        const gchar *res;
 
-       ews_settings = eos_office365_get_camel_settings (source);
-       if (ews_settings && camel_ews_settings_get_override_oauth2 (ews_settings)) {
+       o365_settings = eos_office365_get_camel_settings (source);
+       if (o365_settings && camel_o365_settings_get_override_oauth2 (o365_settings)) {
                gchar *redirect_uri;
 
-               redirect_uri = camel_ews_settings_dup_oauth2_redirect_uri (ews_settings);
+               redirect_uri = camel_o365_settings_dup_oauth2_redirect_uri (o365_settings);
 
                if (redirect_uri && !*redirect_uri) {
                        g_free (redirect_uri);
@@ -236,9 +250,10 @@ eos_office365_prepare_authentication_uri_query (EOAuth2Service *service,
 {
        g_return_if_fail (uri_query != NULL);
 
+       e_oauth2_service_util_set_to_form (uri_query, "response_type", "code");
+       e_oauth2_service_util_set_to_form (uri_query, "scope", OFFICE365_SCOPE);
        e_oauth2_service_util_set_to_form (uri_query, "response_mode", "query");
-       e_oauth2_service_util_set_to_form (uri_query, "prompt", "login");
-       e_oauth2_service_util_set_to_form (uri_query, "resource", OFFICE365_RESOURCE);
+       e_oauth2_service_util_set_to_form (uri_query, "login_hint", NULL);
 }
 
 static gboolean
@@ -305,7 +320,7 @@ eos_office365_prepare_refresh_token_form (EOAuth2Service *service,
 {
        g_return_if_fail (form != NULL);
 
-       e_oauth2_service_util_set_to_form (form, "resource", OFFICE365_RESOURCE);
+       e_oauth2_service_util_set_to_form (form, "scope", OFFICE365_SCOPE);
        e_oauth2_service_util_set_to_form (form, "redirect_uri", e_oauth2_service_get_redirect_uri (service, 
source));
 }
 
@@ -344,8 +359,6 @@ e_oauth2_service_office365_class_init (EOAuth2ServiceOffice365Class *klass)
 {
        GObjectClass *object_class;
 
-       g_type_class_add_private (klass, sizeof (EOAuth2ServiceOffice365Private));
-
        object_class = G_OBJECT_CLASS (klass);
        object_class->finalize = eos_office365_finalize;
 }
@@ -358,7 +371,7 @@ e_oauth2_service_office365_class_finalize (EOAuth2ServiceOffice365Class *klass)
 static void
 e_oauth2_service_office365_init (EOAuth2ServiceOffice365 *oauth2_office365)
 {
-       oauth2_office365->priv = G_TYPE_INSTANCE_GET_PRIVATE (oauth2_office365, 
E_TYPE_OAUTH2_SERVICE_OFFICE365, EOAuth2ServiceOffice365Private);
+       oauth2_office365->priv = e_oauth2_service_office365_get_instance_private (oauth2_office365);
 
        g_mutex_init (&oauth2_office365->priv->string_cache_lock);
        oauth2_office365->priv->string_cache = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
diff --git a/src/server/e-oauth2-service-office365.h b/src/Office365/common/e-oauth2-service-office365.h
similarity index 100%
rename from src/server/e-oauth2-service-office365.h
rename to src/Office365/common/e-oauth2-service-office365.h
diff --git a/src/Office365/evolution/module-o365-configuration.c 
b/src/Office365/evolution/module-o365-configuration.c
index 37dff72c..4e1f2a8b 100644
--- a/src/Office365/evolution/module-o365-configuration.c
+++ b/src/Office365/evolution/module-o365-configuration.c
@@ -19,12 +19,14 @@
 
 #include <glib/gi18n-lib.h>
 
+#include "common/camel-sasl-xoauth2-office365.h"
+#include "common/e-oauth2-service-office365.h"
+#include "common/e-source-o365-folder.h"
+
 #include "e-cal-config-o365.h"
 #include "e-book-config-o365.h"
 #include "e-mail-config-o365-backend.h"
 
-#include "common/e-source-o365-folder.h"
-
 /* Module Entry Points */
 void e_module_load (GTypeModule *type_module);
 void e_module_unload (GTypeModule *type_module);
@@ -35,6 +37,8 @@ e_module_load (GTypeModule *type_module)
        bindtextdomain (GETTEXT_PACKAGE, O365_LOCALEDIR);
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
+       camel_sasl_xoauth2_office365_type_register (type_module);
+       e_oauth2_service_office365_type_register (type_module);
        e_source_o365_folder_type_register (type_module);
 
        e_cal_config_o365_type_register (type_module);
diff --git a/src/Office365/registry/module-o365-backend.c b/src/Office365/registry/module-o365-backend.c
index 5f79c6c6..7129b501 100644
--- a/src/Office365/registry/module-o365-backend.c
+++ b/src/Office365/registry/module-o365-backend.c
@@ -19,6 +19,7 @@
 
 #include <glib/gi18n-lib.h>
 
+#include "common/e-oauth2-service-office365.h"
 #include "common/e-source-o365-folder.h"
 
 #include "e-o365-backend.h"
@@ -34,9 +35,11 @@ e_module_load (GTypeModule *type_module)
        bindtextdomain (GETTEXT_PACKAGE, O365_LOCALEDIR);
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
+       e_oauth2_service_office365_type_register (type_module);
+       e_source_o365_folder_type_register (type_module);
+
        e_o365_backend_type_register (type_module);
        e_o365_backend_factory_type_register (type_module);
-       e_source_o365_folder_type_register (type_module);
 }
 
 G_MODULE_EXPORT void
diff --git a/src/addressbook/e-book-backend-ews-factory.c b/src/addressbook/e-book-backend-ews-factory.c
index 17100856..d91a7da0 100644
--- a/src/addressbook/e-book-backend-ews-factory.c
+++ b/src/addressbook/e-book-backend-ews-factory.c
@@ -27,7 +27,6 @@
 
 #include <libedata-book/libedata-book.h>
 
-#include "server/e-oauth2-service-office365.h"
 #include "server/e-source-ews-folder.h"
 
 #include "e-book-backend-ews.h"
@@ -81,7 +80,6 @@ e_module_load (GTypeModule *type_module)
        e_module = E_MODULE (type_module);
 
        e_source_ews_folder_type_register (type_module);
-       e_oauth2_service_office365_type_register (type_module);
 
        e_book_backend_ews_factory_register_type (type_module);
 }
diff --git a/src/calendar/e-cal-backend-ews-factory.c b/src/calendar/e-cal-backend-ews-factory.c
index 06f01fb7..8e57b79d 100644
--- a/src/calendar/e-cal-backend-ews-factory.c
+++ b/src/calendar/e-cal-backend-ews-factory.c
@@ -12,7 +12,6 @@
 
 #include <libedata-cal/libedata-cal.h>
 
-#include "server/e-oauth2-service-office365.h"
 #include "server/e-source-ews-folder.h"
 
 #include "e-cal-backend-ews.h"
@@ -135,7 +134,6 @@ e_module_load (GTypeModule *type_module)
        e_module = E_MODULE (type_module);
 
        e_source_ews_folder_type_register (type_module);
-       e_oauth2_service_office365_type_register (type_module);
 
        e_cal_backend_ews_events_factory_register_type (type_module);
        e_cal_backend_ews_journal_factory_register_type (type_module);
diff --git a/src/camel/camel-ews-provider.c b/src/camel/camel-ews-provider.c
index 3b10de48..4dd93729 100644
--- a/src/camel/camel-ews-provider.c
+++ b/src/camel/camel-ews-provider.c
@@ -31,8 +31,6 @@
 #include <glib/gi18n-lib.h>
 #include <gmodule.h>
 
-#include "server/camel-sasl-xoauth2-office365.h"
-
 #include "camel-ews-store.h"
 #include "camel-ews-transport.h"
 
@@ -145,8 +143,6 @@ camel_provider_module_init (void)
        bindtextdomain (GETTEXT_PACKAGE, EXCHANGE_EWS_LOCALEDIR);
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
-       g_type_ensure (CAMEL_TYPE_SASL_XOAUTH2_OFFICE365);
-
        camel_provider_register (&ews_provider);
 }
 
diff --git a/src/collection/module-ews-backend.c b/src/collection/module-ews-backend.c
index 6f63634b..8bfac431 100644
--- a/src/collection/module-ews-backend.c
+++ b/src/collection/module-ews-backend.c
@@ -20,7 +20,6 @@
 
 #include <glib/gi18n-lib.h>
 
-#include "server/e-oauth2-service-office365.h"
 #include "server/e-source-ews-folder.h"
 
 #include "e-ews-backend.h"
@@ -38,7 +37,6 @@ e_module_load (GTypeModule *type_module)
 
        e_ews_backend_type_register (type_module);
        e_ews_backend_factory_type_register (type_module);
-       e_oauth2_service_office365_type_register (type_module);
 
        e_source_ews_folder_type_register (type_module);
 }
diff --git a/src/configuration/module-ews-configuration.c b/src/configuration/module-ews-configuration.c
index 818daf0b..7d7ae07f 100644
--- a/src/configuration/module-ews-configuration.c
+++ b/src/configuration/module-ews-configuration.c
@@ -20,6 +20,8 @@
 
 #include <glib/gi18n-lib.h>
 
+#include "server/e-source-ews-folder.h"
+
 #include "e-cal-config-ews.h"
 #include "e-book-config-ews.h"
 #include "e-mail-config-ews-autodiscover.h"
@@ -31,15 +33,11 @@
 #include "e-mail-config-ews-offline-options.h"
 #include "e-mail-config-ews-ooo-page.h"
 #include "e-mail-config-ews-folder-sizes-page.h"
+#include "e-ews-config-ui-extension.h"
 #include "e-ews-ooo-notificator.h"
 #include "e-ews-config-lookup.h"
 #include "e-ews-photo-source.h"
 
-#include "e-ews-config-ui-extension.h"
-#include "server/camel-sasl-xoauth2-office365.h"
-#include "server/e-oauth2-service-office365.h"
-#include "server/e-source-ews-folder.h"
-
 /* Module Entry Points */
 void e_module_load (GTypeModule *type_module);
 void e_module_unload (GTypeModule *type_module);
@@ -65,8 +63,6 @@ e_module_load (GTypeModule *type_module)
        e_ews_config_ui_extension_type_register (type_module);
        e_ews_ooo_notificator_type_register (type_module);
        e_ews_photo_source_type_register (type_module);
-       camel_sasl_xoauth2_office365_type_register (type_module);
-       e_oauth2_service_office365_type_register (type_module);
 
        e_source_ews_folder_type_register (type_module);
 }
diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt
index 94dcb0b4..955668ee 100644
--- a/src/server/CMakeLists.txt
+++ b/src/server/CMakeLists.txt
@@ -3,8 +3,6 @@ glib_mkenums(e-ews-enumtypes e-ews-enums.h E_EWS_ENUMTYPES_H)
 set(SOURCES
        camel-ews-settings.c
        camel-ews-settings.h
-       camel-sasl-xoauth2-office365.c
-       camel-sasl-xoauth2-office365.h
        e-ews-calendar-utils.c
        e-ews-calendar-utils.h
        e-ews-camel-common.c
@@ -28,8 +26,6 @@ set(SOURCES
        e-ews-oof-settings.c
        e-ews-query-to-restriction.c
        e-ews-query-to-restriction.h
-       e-oauth2-service-office365.c
-       e-oauth2-service-office365.h
        e-soup-auth-negotiate.c
        e-soup-auth-negotiate.h
        e-soap-message.c


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]