Sha256: 48096ae2d6bf9ec9909500b1db91e0e3376027418aa62d075a66f344d9eb75b2
Contents?: true
Size: 838 Bytes
Versions: 9
Compression:
Stored size: 838 Bytes
Contents
# Copyright (c) 2015 Sqreen. All Rights Reserved. # Please refer to our terms for more information: https://www.sqreen.com/terms.html require 'sqreen/rules/attrs' require 'sqreen/rules/rule_cb' require 'sqreen/safe_json' module Sqreen module Rules class SignupTrackCB < RuleCB def initialize(*args) super(*args) @overtimeable = false end def pre(_instance, args, _budget) authentication_keys = args.first ip = framework.client_ip category = 'sdk-signup' if authentication_keys.empty? Sqreen.log.debug { "#{category} from #{ip} but keys empty" } return end payload = { keys: authentication_keys.to_a, ip: ip } record_observation(category, JSON.dump(payload), 1) advise_action(nil) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems