Sha256: 898c47bdcb528ac430ea1c59032020595b42f5845363f1fa787eb5d283cc41fb
Contents?: true
Size: 522 Bytes
Versions: 12
Compression:
Stored size: 522 Bytes
Contents
module Faye module Authentication class ClientExtension def initialize(secret, options = {}) @secret = secret @options = options end def outgoing(message, callback) if Faye::Authentication.authentication_required?(message, @options) message['signature'] = Faye::Authentication.sign({channel: message['subscription'] || message['channel'], clientId: message['clientId']}, @secret, @options) end callback.call(message) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems