def valid?(extra_tokens = nil)
      extra_tokens = [extra_tokens] if extra_tokens.kind_of?(Hash)
      if @key == @client.key
        return check_signature(@client.secret)
      elsif extra_tokens
        extra_tokens.each do |token|
          return check_signature(token[:secret]) if @key == token[:key]
        end
      end
      Pusher.logger.warn "Received webhook with unknown key: #{key}"
      return false
    end
def valid?(extra_tokens = nil)
      extra_tokens = [extra_tokens] if extra_tokens.kind_of?(Hash)
      if @key == @client.key
        return check_signature(@client.secret)
      elsif extra_tokens
        extra_tokens.each do |token|
          return check_signature(token[:secret]) if @key == token[:key]
        end
      end
      Pusher.logger.warn "Received webhook with unknown key: #{key}"
      return false
    end
Provide either a Rack::Request or a Hash containing :key, :signature,
 :body, and :content_type (optional)

 Returns whether the WebHook is valid by checking that the signature
 matches the configured key & secret. In the case that the webhook is
 invalid, the reason is logged

 @param extra_tokens [Hash] If you have extra tokens for your Pusher app, you can specify them so that they're used to attempt validation.