lib/faye/authentication/client_extension.rb in faye-authentication-0.3.0 vs lib/faye/authentication/client_extension.rb in faye-authentication-0.4.0

- old
+ new

@@ -6,10 +6,10 @@ @secret = secret @options = options end def outgoing(message, callback) - if message['channel'] == '/meta/subscribe' || !(message['channel'] =~ /^\/meta\/.*/) + if Faye::Authentication.authentication_required?(message) message['signature'] = Faye::Authentication.sign({channel: message['subscription'] || message['channel'], clientId: message['clientId']}, @secret, @options) end callback.call(message) end