Sha256: 720c1b1fbcebfd5843d28a4d838ec00e0ca331db8a6d563c63ff450cd3e96b90
Contents?: true
Size: 374 Bytes
Versions: 9
Compression:
Stored size: 374 Bytes
Contents
class FayeAuthExt def initialize(user_id, token) @user_id = user_id @token = token end def outgoing(message, callback) # Add ext field if it's not present message['ext'] ||= {} # Set the auth token message['ext']['authToken'] = "#{@user_id}:#{@token}" # Carry on and send the message to the server callback.call(message) end end
Version data entries
9 entries across 9 versions & 1 rubygems