验证 ActionCable 连接 [英] Authenticating ActionCable connections

查看:46
本文介绍了验证 ActionCable 连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了一个很棒的 ActionCable gem,这是一个很好的 SPA 解决方案.

I've found a wonderful ActionCable gem, which is a good solution for SPA.

我只想发送htmlcssjs资源,其他所有连接都通过ActionCable实现代码>.交换字符串或整数并不难,但如何通过ActionCable 登录?

I want to send only the html, css and js assets, all other connections will be implemented through ActionCable. It's not difficult to exchange strings or integers, but how can I login through ActionCable?

推荐答案

解决方案是使用 HTTP 授权令牌.它简单、广泛且显而易见.这篇文章帮助了我很多

The solution is to use HTTP authorization token. It's simple, widespread and obvious. This article helped me a lot

这篇关于验证 ActionCable 连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆