ruby on rails - How To Authenticate With Keys In ActionCable -
i able authenticate cookies in actioncable
using cookies.signed[:user_id]
can't figure out how using keys. example, sending authorization
header when establishing connection.
the variable accessible in applicationcable::connection
class cookies
. other variables (params
, headers
) not available.
any ideas?
i able authenticate sending authentication keys when subscribing channel. if keys invalid, calls connection.send(:reject_unauthorized_connection)
in channel.
Comments
Post a Comment