diff options
author | José Bollo <jose.bollo@iot.bzh> | 2016-05-29 12:35:26 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2016-05-29 12:35:26 +0200 |
commit | 2ea7ffb3abc8c62cfd5235ba4dbcd040f0235d69 (patch) | |
tree | 7481f2ebec982321126fe77e708abe3f8cdd04c4 /test/AFB.js | |
parent | 6881297e1b8f8e0977088d79cbc417d884cac300 (diff) |
don't enforce to refresh the token
Change-Id: I4257210371c4b809e93c174e00677a82c4b196c7
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'test/AFB.js')
-rw-r--r-- | test/AFB.js | 8 |
1 files changed, 7 insertions, 1 deletions
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; |