Sha256: 821bf21f2f85d42527e39cc70c48c796a49e6bce9afd72d7544c1b9a16d1e9d8
Contents?: true
Size: 707 Bytes
Versions: 12
Compression:
Stored size: 707 Bytes
Contents
require 'sqreen/rule_attributes' require 'sqreen/rule_callback' 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
12 entries across 12 versions & 1 rubygems