Class: Ingenico::Connect::SDK::Logging::HeaderObfuscator Deprecated

Inherits:
Obfuscator
  • Object
show all
Defined in:
lib/ingenico/connect/sdk/logging/logging_util.rb

Overview

Deprecated.

This class shouldn’t have been exposed

Class that obfuscates headers of a message

Defined Under Namespace

Classes: Builder

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(obfuscators) ⇒ HeaderObfuscator

Returns a new instance of HeaderObfuscator.



166
167
168
169
170
171
# File 'lib/ingenico/connect/sdk/logging/logging_util.rb', line 166

def initialize(obfuscators)
  # case insensitive
  super(obfuscators, true)
  obfuscation_rules = obfuscators.map { |key, value| [key, ->(v) { value.obfuscate_value(v) }]}
  @obfuscator = Obfuscation::HeaderObfuscator.new(obfuscation_rules)
end

Class Method Details

.builderObject



177
178
179
# File 'lib/ingenico/connect/sdk/logging/logging_util.rb', line 177

def self.builder
  Builder.new
end

Instance Method Details

#obfuscate_value(key, value) ⇒ Object



173
174
175
# File 'lib/ingenico/connect/sdk/logging/logging_util.rb', line 173

def obfuscate_value(key, value)
  @obfuscator.obfuscate_header(key, value)
end