[evolution-ews/gnome-3-30] I#8 - Handle 'Persistent-Auth: false' when provided by the server



commit 1b37cae87f3e8f5def1770f7149eec97515ccda7
Author: Milan Crha <mcrha redhat com>
Date:   Wed Sep 5 12:04:44 2018 +0200

    I#8 - Handle 'Persistent-Auth: false' when provided by the server
    
    Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/8

 src/server/e-ews-connection.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index 3f0e8c86..e365d2fc 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -847,9 +847,20 @@ ews_response_cb (SoupSession *session,
        EwsNode *enode = (EwsNode *) data;
        ESoapResponse *response;
        ESoapParameter *param;
+       const gchar *persistent_auth;
        gint log_level;
        gint wait_ms = 0;
 
+       persistent_auth = soup_message_headers_get_one (msg->response_headers, "Persistent-Auth");
+       if (persistent_auth && g_ascii_strcasecmp (persistent_auth, "false") == 0) {
+               SoupSessionFeature *feature;
+
+               feature = soup_session_get_feature (session, SOUP_TYPE_AUTH_MANAGER);
+               if (feature) {
+                       soup_auth_manager_clear_cached_credentials (SOUP_AUTH_MANAGER (feature));
+               }
+       }
+
        if (g_cancellable_is_cancelled (enode->cancellable))
                goto exit;
 


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