Module: Ingenico::Connect::SDK::Logging::LoggingUtil

Defined in:
lib/ingenico/connect/sdk/logging/logging_util.rb

Overview

end of property obfuscator

Constant Summary collapse

@@PROPERTY_OBFUSCATOR =
PropertyObfuscator.builder
.with_keep_end_count("cardNumber", 4)
.with_keep_end_count("expiryDate", 2)
.with_all("cvv")
.with_keep_end_count("iban", 4)
.with_keep_end_count("accountNumber", 4)
.with_keep_end_count("reformattedAccountNumber", 4)
.with_keep_start_count("bin", 6)
.with_all("value")
.with_fixed_length("keyId", 8)
.with_fixed_length("secretKey", 8)
.with_fixed_length("publicKey", 8)
.with_fixed_length("userAuthenticationToken", 8)
.with_fixed_length("encryptedPayload", 8)
.with_fixed_length("decryptedPayload", 8)
.with_fixed_length("encryptedCustomerInput", 8)
.build
@@HEADER_OBFUSCATOR =
HeaderObfuscator.builder
.with_fixed_length("Authorization", 8)
.with_fixed_length("WWW-Authenticate", 8)
.with_fixed_length("Proxy-Authenticate", 8)
.with_fixed_length("Proxy-Authorization", 8)
.with_fixed_length("X-GCS-Authentication-Token", 8)
.with_fixed_length("X-GCS-CallerPassword", 8)
.build

Class Method Summary collapse

Class Method Details

.obfuscate_body(body) ⇒ Object



291
292
293
# File 'lib/ingenico/connect/sdk/logging/logging_util.rb', line 291

def self.obfuscate_body(body)
  @@PROPERTY_OBFUSCATOR.obfuscate(body)
end

.obfuscate_header(name, value) ⇒ Object



295
296
297
# File 'lib/ingenico/connect/sdk/logging/logging_util.rb', line 295

def self.obfuscate_header(name, value)
  @@HEADER_OBFUSCATOR.obfuscate_value(name, value)
end