Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: cb75fe072c
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (18 sloc) 0.531 kB
class PusherController < ApplicationController
protect_from_forgery :except => :auth
def auth
if current_user
response = Pusher[params[:channel_name]].authenticate(params[:socket_id], {
:user_id => current_user.id,
:user_info => { # => optional - for example
:name => current_user.name,
:email => current_user.email,
:uid => current_user.uid
}
})
render :json => response
else
render :text => "Forbidden", :status => '403'
end
end
end
Jump to Line
Something went wrong with that request. Please try again.