[epiphany/wip/sync: 25/86] sync-service: #define the assertion duration



commit 221b94e1e508e34f8e5d3d949731bc0ec7679bf5
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date:   Thu Feb 23 22:58:48 2017 +0200

    sync-service: #define the assertion duration

 src/sync/ephy-sync-service.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/sync/ephy-sync-service.c b/src/sync/ephy-sync-service.c
index 0fd0a05..c27557b 100644
--- a/src/sync/ephy-sync-service.c
+++ b/src/sync/ephy-sync-service.c
@@ -38,8 +38,9 @@
 #define MOZILLA_TOKEN_SERVER_URL  "https://token.services.mozilla.com/1.0/sync/1.5";
 #define MOZILLA_FXA_SERVER_URL    "https://api.accounts.firefox.com/v1/";
 #define EPHY_BOOKMARKS_COLLECTION "ephy-bookmarks"
-#define SYNC_FREQUENCY            (15 * 60) /* seconds */
+#define SYNC_FREQUENCY            (15 * 60)        /* seconds */
 #define CERTIFICATE_DURATION      (60 * 60 * 1000) /* milliseconds, limited to 24 hours */
+#define ASSERTION_DURATION        (5 * 60)         /* seconds */
 
 struct _EphySyncService {
   GObject      parent_instance;
@@ -425,7 +426,8 @@ ephy_sync_service_obtain_storage_credentials (EphySyncService *self,
   g_return_if_fail (self->keypair != NULL);
 
   audience = ephy_sync_utils_make_audience (MOZILLA_TOKEN_SERVER_URL);
-  assertion = ephy_sync_crypto_create_assertion (self->certificate, audience, 300, self->keypair);
+  assertion = ephy_sync_crypto_create_assertion (self->certificate, audience,
+                                                 ASSERTION_DURATION, self->keypair);
   g_return_if_fail (assertion != NULL);
 
   kB = ephy_sync_crypto_decode_hex (self->kB);


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