diff options
author | José Bollo <jose.bollo@iot.bzh> | 2016-04-15 22:01:37 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2016-04-15 22:01:37 +0200 |
commit | 922b183f441a6e68b55592596fa62cc6e1814f74 (patch) | |
tree | 4da858e9fe8d322bca6211a8a82a5f0651d373a3 /afm-client/app/Backend/RestApis/TokenMockApi.js | |
parent | b7fc92a77ba73e983eed280d769c8f7a86b0db3a (diff) |
update to afb-daemon evolutions
- change the jtype
- names uploaded widgets 'widget'
Change-Id: I4634f71f820ba9c6619d944dd68b0238ed649a23
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'afm-client/app/Backend/RestApis/TokenMockApi.js')
-rw-r--r-- | afm-client/app/Backend/RestApis/TokenMockApi.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/afm-client/app/Backend/RestApis/TokenMockApi.js b/afm-client/app/Backend/RestApis/TokenMockApi.js index 5ef1cfa..073f1df 100644 --- a/afm-client/app/Backend/RestApis/TokenMockApi.js +++ b/afm-client/app/Backend/RestApis/TokenMockApi.js @@ -39,12 +39,12 @@ function NewApi(handle, prefix) { // Simulate Client Context Session Creation handle.app.get(prefix +'/create', function (req, res) { handle.trace (scope, 1, "%s/create", prefix); - var okResponse= '{ "jtype": "AJB_reply"' + + var okResponse= '{ "jtype": "afb-reply"' + ', "request": { "prefix": "afbs", "api": "create", "uuid": "e4ef5e66-xxxx", "token": "123456789-xxxxx", "status": "processed" }'+ ', "response": { "token": "Token was refreshed" }'+ '}'; - var fxResponse= '{ "jtype": "AJB_reply" ' + + var fxResponse= '{ "jtype": "afb-reply" ' + ', "request": { "prefix": "afbs", "api": "create", "status": "fail", "info": "AFB_SESSION_REFRESH Not Initial Token Chain" }'+ '}'; @@ -59,12 +59,12 @@ function NewApi(handle, prefix) { // Simulate Client Context Check handle.app.get(prefix +'/check', function (req, res) { handle.trace (scope, 1, "%s/check query=%s", prefix, req.query.token); - var okResponse= '{"jtype":"AJB_reply"'+ + var okResponse= '{"jtype":"afb-reply"'+ ',"request":{"prefix":"afbs","api":"check", "status":"processed"}'+ ',"response":{"isvalid":true}'+ '}'; - var fxResponse= '{"jtype":"AJB_reply",'+ + var fxResponse= '{"jtype":"afb-reply",'+ '"request":{"prefix":"afbs","api":"check","status":"empty","info":"AFB_SESSION_CHECK Not a Valid Active Token"}'+ '}'; @@ -75,12 +75,12 @@ function NewApi(handle, prefix) { // Simulate Client Context Check handle.app.get(prefix +'/refresh', function (req, res) { handle.trace (scope, 1, "%s/refresh query=%s", prefix, req.query.token); - var okResponse= '{"jtype":"AJB_reply"'+ + var okResponse= '{"jtype":"afb-reply"'+ ',"request":{"prefix":"afbs","api":"refresh","uuid": "e4ef5e66-xxxx", "token": "123456789-xxxxx","status":"processed"}'+ ',"response":{"isvalid":true}'+ '}'; - var fxResponse= '{"jtype":"AJB_reply",'+ + var fxResponse= '{"jtype":"afb-reply",'+ '"request":{"prefix":"afbs","api":"refresh","status":"empty","info":"AFB_SESSION_REFRESH Not a Valid Active Token"}'+ '}'; @@ -91,12 +91,12 @@ function NewApi(handle, prefix) { // Simulate Client Context Session Closing handle.app.get(prefix +'/reset', function (req, res) { handle.trace (scope, 1, "%s/reset query=%s", prefix, req.query.token); - var okResponse= '{"jtype":"AJB_reply"'+ + var okResponse= '{"jtype":"afb-reply"'+ ',"request":{"prefix":"afbs","api":"reset","uuid": "e4ef5e66-xxxx","status":"processed"}'+ ',"response":{"uuid":"b028b883-8b47-4c6d-9c6e-e79b9e2b81b9"}'+ '}'; - var fxResponse= '{"jtype":"AJB_reply",'+ + var fxResponse= '{"jtype":"afb-reply",'+ '"request":{"prefix":"afbs","api":"reset","status":"empty","info":"AFB_SESSION_CLOSE Not a Valid Access Token"}'+ '}'; |