diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-04-12 17:56:20 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-04-12 17:56:20 +0200 |
commit | a138fda9841c46e28de93e32aee62956e26556b1 (patch) | |
tree | ebb792f5d289f4a027a29b5fb573807ab2240327 /src/afb-ws-json1.c | |
parent | 09010fa0093bee944738b728bf3277961d9bd6d7 (diff) |
Add credential data to xreq
This will allow soon to check the credentials when
evaluating calls.
Change-Id: I993216ccbc02538dcd92e49fcb2de0541eeb8c01
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-ws-json1.c')
-rw-r--r-- | src/afb-ws-json1.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/afb-ws-json1.c b/src/afb-ws-json1.c index 60a0a801..4e405715 100644 --- a/src/afb-ws-json1.c +++ b/src/afb-ws-json1.c @@ -192,6 +192,7 @@ static void aws_on_call(struct afb_ws_json1 *ws, const char *api, const char *ve /* fill and record the request */ afb_wsj1_msg_addref(msg); wsreq->msgj1 = msg; + wsreq->xreq.cred = afb_cred_addref(ws->cred); wsreq->xreq.api = api; wsreq->xreq.verb = verb; wsreq->xreq.json = afb_wsj1_msg_object_j(wsreq->msgj1); @@ -222,6 +223,7 @@ static void wsreq_destroy(struct afb_xreq *xreq) afb_context_disconnect(&wsreq->xreq.context); afb_wsj1_msg_unref(wsreq->msgj1); + afb_cred_unref(wsreq->xreq.cred); aws_unref(wsreq->aws); free(wsreq); } |