Class: TCellAgent::SensorEvents::TCellFingerprintSensorEvent
Instance Attribute Summary
#ensure, #flush, #send
Instance Method Summary
collapse
#bucket_key, #calculateOffset
Constructor Details
71
72
73
74
75
76
|
# File 'lib/tcell_agent/sensor_events/sensor.rb', line 71
def initialize(request, session_id, user_id=nil)
super("fingerprint")
@raw_request = request
@raw_session_id = session_id
@user_id = user_id
end
|
Instance Method Details
#post_process ⇒ Object
77
78
79
80
81
82
83
84
85
86
87
88
|
# File 'lib/tcell_agent/sensor_events/sensor.rb', line 77
def post_process
if !(@raw_request..key?("HTTP_USER_AGENT"))
raise "User Agent not Found!"
end
self["ua"] = @raw_request.["HTTP_USER_AGENT"]
self["ip"] = @raw_request.remote_ip
hmac_key = Util.getHmacKey()
self["sid"] = Util.hmac(@raw_session_id, hmac_key)
if @user_id
self["uid"] = @user_id
end
end
|