Added new authentication methods using authKey
and cookies. Also now handles changes to base url for use with reverse proxies
This commit is contained in:
@@ -1,44 +1,57 @@
|
||||
import { createRouter, createWebHistory } from "vue-router";
|
||||
import HomeView from "../views/HomeView.vue";
|
||||
import ReferenSearchByReferenceViewceID from "../views/SearchByReferenceView.vue";
|
||||
import AboutView from "../views/AboutView.vue";
|
||||
import DebugFrameView from "../views/DebugFrameView.vue";
|
||||
import SideBarView from "../views/SideBarView.vue";
|
||||
import SearchByReferenceView from "../views/SearchByReferenceView.vue";
|
||||
import InteractionsFlowView from "../views/InteractionsFlowView.vue";
|
||||
import CustomerAccountView from "../views/CustomerAccountView.vue";
|
||||
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: "/",
|
||||
name: "home",
|
||||
component: HomeView,
|
||||
components: { default: HomeView, SideBarView: SideBarView },
|
||||
props: { default: false, SideBarView: true }
|
||||
},
|
||||
{
|
||||
path: "/about",
|
||||
name: "about",
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "about" */ "../views/AboutView.vue"),
|
||||
components: { default: AboutView, SideBarView: SideBarView },
|
||||
props: { default: false, SideBarView: true }
|
||||
},
|
||||
{
|
||||
path: "/referenceId",
|
||||
name: "referenceId",
|
||||
component: ReferenSearchByReferenceViewceID,
|
||||
components: { default: SearchByReferenceView, SideBarView: SideBarView },
|
||||
props: { default: route => ({ sessionIdentifier: route.query._sessionIdentifier }) }
|
||||
},
|
||||
{
|
||||
path: "/interactionsFlow",
|
||||
name: "interactionsFlow",
|
||||
component: InteractionsFlowView,
|
||||
components: { default: InteractionsFlowView, SideBarView: SideBarView },
|
||||
props: { default: route => ({ sessionIdentifier: route.query._sessionIdentifier }) }
|
||||
},
|
||||
{
|
||||
path: "/customerAccount/:accountNumber",
|
||||
name: "customerAccount",
|
||||
component: CustomerAccountView,
|
||||
props: true,
|
||||
components: { default: CustomerAccountView, SideBarView: SideBarView },
|
||||
props: { default: true, SideBarView: true }
|
||||
},
|
||||
{
|
||||
path: "/debug",
|
||||
name: "debug",
|
||||
component: DebugFrameView,
|
||||
components: { default: DebugFrameView },
|
||||
props: { default: true }
|
||||
},
|
||||
];
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
base: `${import.meta.env.VITE_ROUTER_BASE}`,
|
||||
routes,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user