Join Slack
Is there any way to authorize a WebSocket connection? It seems like the `WsFilter` only works with ...
# http4k
a
Andrew O'Hara
11/24/2022, 6:00 PM
Is there any way to authorize a WebSocket connection? It seems like the
WsFilter
only works with a
Websocket
that's already open. Is the only alternative to close the
Websocket
immediately after failing to validate the authorization?
d
dave
11/24/2022, 6:05 PM
AFAIK, that's effectively the way to do it - with an appropriate code. (1008?). Let us know if you find other mechanisms! 🙂
a
Andrew O'Hara
11/24/2022, 6:22 PM
Will do, thanks. Related: I'm struggling to think of a use-case for a
WsFilter
. What did you have in mind when you added it?
d
dave
11/24/2022, 7:10 PM
the usual cross cutting stuff - logging, security. doesn't that work?
a
Andrew O'Hara
11/24/2022, 8:08 PM
I suppose it does. 🤔
Andrew O'Hara
11/24/2022, 8:09 PM
Might be worth a doc update to give an example or two
4
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by