Sha256: 87679b5dc43ed3920eb2f76a79061a22f6510306cc3f94aada9eff12007d4a02
Contents?: true
Size: 526 Bytes
Versions: 11
Compression:
Stored size: 526 Bytes
Contents
class Jason::PusherController < ApplicationController skip_before_action :verify_authenticity_token def auth channel_main_name = params[:channel_name].remove("private-#{Jason.pusher_channel_prefix}-") subscription_id = channel_main_name.remove('jason-') if Jason::Subscription.find_by_id(subscription_id).user_can_access?(current_user) response = Pusher.authenticate(params[:channel_name], params[:socket_id]) return render json: response else return head :forbidden end end end
Version data entries
11 entries across 11 versions & 1 rubygems