Class: TCellAgent::SensorEvents::TCellFingerprintSensorEvent
- Inherits:
-
TCellSensorEvent
- Object
- Hash
- TCellSensorEvent
- TCellAgent::SensorEvents::TCellFingerprintSensorEvent
- Defined in:
- lib/tcell_agent/sensor_events/sensor.rb
Instance Attribute Summary
Attributes inherited from TCellSensorEvent
Instance Method Summary collapse
-
#initialize(request, hmac_session_id, user_id = nil) ⇒ TCellFingerprintSensorEvent
constructor
A new instance of TCellFingerprintSensorEvent.
- #post_process ⇒ Object
Methods inherited from TCellSensorEvent
Constructor Details
#initialize(request, hmac_session_id, user_id = nil) ⇒ TCellFingerprintSensorEvent
Returns a new instance of TCellFingerprintSensorEvent.
75 76 77 78 79 80 |
# File 'lib/tcell_agent/sensor_events/sensor.rb', line 75 def initialize(request, hmac_session_id, user_id=nil) super("fingerprint") @raw_request = request @hmac_session_id = hmac_session_id @user_id = user_id end |
Instance Method Details
#post_process ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/tcell_agent/sensor_events/sensor.rb', line 81 def post_process if !(@raw_request.headers.key?("HTTP_USER_AGENT")) raise "User Agent not Found!" end self["ua"] = @raw_request.headers["HTTP_USER_AGENT"] self["ip"] = @raw_request.remote_ip self["sid"] = @hmac_session_id if @user_id self["uid"] = @user_id end end |