X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=test%2FAFB.js;h=c77e5e60056093083902762c3fdeb4e411fb85b6;hb=2ea7ffb3abc8c62cfd5235ba4dbcd040f0235d69;hp=ae2fd8b8f4a11a6663c316d32197a16d12c3aedb;hpb=6881297e1b8f8e0977088d79cbc417d884cac300;p=src%2Fapp-framework-binder.git diff --git a/test/AFB.js b/test/AFB.js index ae2fd8b8..c77e5e60 100644 --- a/test/AFB.js +++ b/test/AFB.js @@ -42,7 +42,13 @@ var AFB_websocket; var PROTO1 = "x-afb-ws-json1"; AFB_websocket = function(onopen, onabort) { - this.ws = new WebSocket(urlws, [ PROTO1 ]); + var u = urlws; + if (AFB_context.token) { + u = u + '?x-afb-token=' + AFB_context.token; + if (AFB_context.uuid) + u = u + '&x-afb-uuid=' + AFB_context.uuid; + } + this.ws = new WebSocket(u, [ PROTO1 ]); this.pendings = {}; this.awaitens = {}; this.counter = 0;