Class HeaderObfuscator

java.lang.Object
com.onlinepayments.logging.HeaderObfuscator

public final class HeaderObfuscator extends Object
A class that can be used to obfuscate headers. Thread-safe if all its obfuscation rules are.
  • Method Details

    • obfuscateHeader

      public String obfuscateHeader(String name, String value)
      Obfuscates the value for the given header as necessary.
    • custom

      public static HeaderObfuscator.Builder custom()
      Returns a builder to create custom header obfuscators. This builder will contain some pre-defined obfuscation rules. These cannot be removed, but replacing them is possible.
    • defaultObfuscator

      public static HeaderObfuscator defaultObfuscator()
      Returns a default header obfuscator. The result will be equivalent to calling custom().build().