From 2d4424c28ac35763ef44c42ae2f01664d42b268c Mon Sep 17 00:00:00 2001 From: Herbert Eiselt Date: Tue, 12 Mar 2019 18:00:21 +0100 Subject: Security provider for UX-Client-Login Use ODL provided oauth2/token for UX clients Change-Id: I9f9ae931fc5e74dc13076bd23551d163c0685606 Issue-ID: SDNC-648 Signed-off-by: Herbert Eiselt --- sdnr/wt/odlux/framework/src/services/notificationService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sdnr/wt/odlux/framework/src/services/notificationService.ts') diff --git a/sdnr/wt/odlux/framework/src/services/notificationService.ts b/sdnr/wt/odlux/framework/src/services/notificationService.ts index 242a6c03b..76132f843 100644 --- a/sdnr/wt/odlux/framework/src/services/notificationService.ts +++ b/sdnr/wt/odlux/framework/src/services/notificationService.ts @@ -1,6 +1,6 @@ import * as X2JS from 'x2js'; -const socketUrl = [ location.protocol === 'https:' ? 'wss://' : 'ws://', 'admin', ':', 'admin', '@', location.hostname, ':',location.port,'/websocket'].join(''); +const socketUrl = [location.protocol === 'https:' ? 'wss://' : 'ws://', 'admin', ':', 'admin', '@', location.hostname, ':', location.port, '/websocket'].join(''); const subscriptions: { [scope: string]: SubscriptionCallback[] } = { }; export interface IFormatedMessage { @@ -29,7 +29,7 @@ function formatData(event: MessageEvent) : IFormatedMessage | undefined { export function subscribe(scope: string | string[], callback: SubscriptionCallback): Promise { return socketReady.then((notificationSocket) => { const scopes = scope instanceof Array ? scope : [scope]; - + // send all new scopes to subscribe const newScopesToSubscribe: string[] = scopes.reduce((acc: string[], cur: string) => { const currentCallbacks = subscriptions[cur]; @@ -102,7 +102,7 @@ const connect = (): Promise => { const callbacks = subscriptions[formated.notifType]; if (callbacks) { callbacks.forEach(cb => { - // ensure all callbacks will be called + // ensure all callbacks will be called try { return cb(formated); } catch (reason) { -- cgit 1.2.3-korg