untangled

NEW CHANNEL: #fulcro
juno 2016-07-14T15:47:18.002172Z

I’m trying to figure out how to integrate token based auth/authz with untangled-websockets, can anyone share knowledge about how I can achieve this? I’ve starred at it for awhile and it’s probably better to ask you guys before I dig in further. Thanks

tony.kay 2016-07-14T16:16:35.002173Z

@juno: @mahinshaw wrote those bits....he's out right now but I'm sure he can give you some tips when he gets back

juno 2016-07-14T16:19:07.002174Z

thank you Tony.

mahinshaw 2016-07-14T16:32:22.002175Z

@juno: We are using Websockets with OAuth here. So it’s likely that there is some overlap

mahinshaw 2016-07-14T16:33:48.002176Z

I just added an endpoint that validaties the token, and sets cookies, which in turn get validated through our ring reqests

mahinshaw 2016-07-14T16:34:38.002177Z

On the Server end we use: https://github.com/untangled-web/untangled-server/blob/master/src/untangled/server/impl/components/access_token_handler.clj to validate tokens

mahinshaw 2016-07-14T16:36:09.002179Z

Cookies are set because websockets do not allow for custom headers, which is where we would have liked to put the token. The query params is also an option (albeit a less secure one) and there are hooks in untantlged-websockets for doing that.

juno 2016-07-14T16:46:27.002180Z

I did go in the direction of writing my own handler which handles the composing of a new hander to the pre-hook. I’ll give another shot on query params as an option for now. I just want to see if I can get this working. Thank you. I’ll hit you up later if I have more unknowns 😃

mahinshaw 2016-07-14T16:47:11.002181Z

Sounds good.