module ApplicationCable
class Connection < ActionCable::Connection::Base
identified_by :current_user
def connect
#puts params[:auth_token]
self.current_user = find_verified_user
logger.add_tags 'ActionCable', current_user.name
end
end
end
Run Code Online (Sandbox Code Playgroud)
我不使用web作为动作电缆的终点,所以我想使用auth_token进行身份验证.默认情况下,操作电缆使用会话用户标识进行验证 如何通过params连接方法?