From cf4c31d919fa85f9d73a1cd33ea14be3205ba733 Mon Sep 17 00:00:00 2001 From: Nicola Carminati Date: Mon, 26 Feb 2018 12:48:58 +0100 Subject: [PATCH] Added Client-id in hub connection --- Step/wwwroot/src/services/hub.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Step/wwwroot/src/services/hub.ts b/Step/wwwroot/src/services/hub.ts index 866b162d..b027b65c 100644 --- a/Step/wwwroot/src/services/hub.ts +++ b/Step/wwwroot/src/services/hub.ts @@ -12,6 +12,7 @@ import { ModalHelper } from "../modules/base-components"; import { AuthToken } from "src/_base/baseRestService"; declare let $: any; +declare let cmsClient: any; function recalcArrayId(prefix: string, alarms: Array, processid: number = 0) { for (const key in alarms) { @@ -60,7 +61,10 @@ export class Hub { let authData = JSON.parse(window.sessionStorage.getItem("authorizationData") || window.localStorage.getItem("authorizationData")) as AuthToken; if (authData) - $.connection.hub.qs = { "Authorization": authData.access_token }; + $.connection.hub.qs = { "Authorization": authData.access_token}; + + if (typeof cmsClient != "undefined") + $.connection.hub.qs.CmsClientId = cmsClient.getClientID; $.connection.hub.start();