From d624dae9d6727a09f6eb33b95c19986826359d6c Mon Sep 17 00:00:00 2001
From: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Date: Mon, 21 Sep 2020 14:35:58 -0700
Subject: Add support for mutual TLS

Adding check for 'IsAuthenticated' cookie in AuthenticationStore
and adding a check in created hook for AppHeader component because
it is visible on all authenticated pages.

Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: Ic558c9c45fd3f5874c8c516cb6bc005cba4946e2
---
 src/components/AppHeader/AppHeader.vue | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'src/components/AppHeader/AppHeader.vue')

diff --git a/src/components/AppHeader/AppHeader.vue b/src/components/AppHeader/AppHeader.vue
index 4eba7522d..5f05406ab 100644
--- a/src/components/AppHeader/AppHeader.vue
+++ b/src/components/AppHeader/AppHeader.vue
@@ -169,6 +169,9 @@ export default {
     }
   },
   created() {
+    // Reset auth state to check if user is authenticated based
+    // on available browser cookies
+    this.$store.dispatch('authentication/resetStoreState');
     this.getHostInfo();
     this.getEvents();
   },
-- 
cgit v1.2.3

