aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2019-11-16 09:30:51 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2019-12-02 10:18:12 +0100
commit98b214e0454f1b55c5ce665bd5c848354d18c9e6 (patch)
treeed499b0a041d0e8d35c3ead762d0f7dfcfd47466
parentaf003cd2241146fd4fc67e5e6fdc0835c0aca66d (diff)
afb-hswitch: Update websocket policy
The previous policy for websocket was to enforce them to present a valid token when establishing. This policy is removed because the Websocket API of javascript doesn't provide a way to set the Bearer token in the HTTP header of the negociation (a big miss in my opinion). But because the new policy of token logic is to check the token at each request, it is not more needed to check it at establishment. Bug-AGL: SPEC-2968 Change-Id: I2941757492a27a2eed14e26fbb411330ab4aa8bc Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afb-hswitch.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/afb-hswitch.c b/src/afb-hswitch.c
index b4692bc5..ab9e94b8 100644
--- a/src/afb-hswitch.c
+++ b/src/afb-hswitch.c
@@ -101,11 +101,6 @@ int afb_hswitch_websocket_switch(struct afb_hreq *hreq, void *data)
return 1;
}
- if (!hreq->xreq.context.validated) {
- afb_hreq_reply_error(hreq, MHD_HTTP_UNAUTHORIZED);
- return 1;
- }
-
return afb_websock_check_upgrade(hreq, apiset);
}