Class JsonMaskingConfig.Builder

java.lang.Object
dev.blaauwendraad.masker.json.config.JsonMaskingConfig.Builder
Enclosing class:
JsonMaskingConfig

public static class JsonMaskingConfig.Builder extends Object
  • Constructor Details

  • Method Details

    • maskNumberValuesWith

      public JsonMaskingConfig.Builder maskNumberValuesWith(int maskNumberValuesWith)
      Specifies the number with which numeric values should be replaced. -1 denotes number masking is disabled.

      Default value: -1

    • algorithmTypeOverride

      public JsonMaskingConfig.Builder algorithmTypeOverride(JsonMaskerAlgorithmType algorithmType)
      Overrides the automatically chosen masking algorithm JsonMaskerAlgorithmType.KEYS_CONTAIN.
      Parameters:
      algorithmType - the override algorithm which will be used
    • obfuscationLength

      public JsonMaskingConfig.Builder obfuscationLength(int obfuscationLength)
      Parameters:
      obfuscationLength - specifies the fixed length of the mask when target value lengths is obfuscated. E.g. masking any string value with obfuscation length 2 results in "**".

      -1 means length obfuscation is disabled.

      Default value: -1 (disabled).

    • caseSensitiveTargetKeys

      public JsonMaskingConfig.Builder caseSensitiveTargetKeys()
      Configures whether the target keys are considered case-sensitive (e.g. cvv != CVV)

      Default value: false (target keys are considered case-insensitive)

    • disableJsonPathResolving

      public JsonMaskingConfig.Builder disableJsonPathResolving()
      Disables that target keys starting with a '$' are interpreted as JSON paths

      Default value: true (JSON path resolving is enabled)

    • build

      public JsonMaskingConfig build()
    • self

      protected JsonMaskingConfig.Builder self()