Sha256: a0db697af2cd32f12c2819981933498ca8f2bb0adffd3808756bb237eaa9e6b1
Contents?: true
Size: 1.61 KB
Versions: 4
Compression:
Stored size: 1.61 KB
Contents
# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true require 'contrast/components/logger' require 'contrast/utils/assess/trigger_method_utils' require 'contrast/agent/reporting/reporting_utilities/endpoints' require 'contrast/components/assess' module Contrast module Agent module Reporting # This is the new ReportingEvent class which will include all the needed and mutual information for the new # reporting system. # # @abstract class ReportingEvent # @return [String] the endpoint, with host, to which this event should be sent attr_reader :event_endpoint # @return event_method [Symbol] the HTTP method to use to send this event attr_reader :event_method def initialize @agent_session_id_value = ::Contrast::ASSESS.session_id @event_endpoint ||= nil @event_method ||= :POST end # Some reports require specific additional headers to be used. To that end, we'll attach them here, letting # each handle their own. # # @param _request [Net::HTTPRequest] def attach_headers _request; end # Convert the instance variables on the class, and other information, into the identifiers required for # TeamServer to process the JSON form of this message. # # @return [Hash] # @raise [ArgumentError] def to_controlled_hash validate {} end # @raise [ArgumentError] def validate; end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems