Class DataSanitizer

java.lang.Object
sk.iway.iwcm.helpers.DataSanitizer

public class DataSanitizer extends Object
Replaces sensitive informations in logs and other outputs
  • Constructor Details

    • DataSanitizer

      public DataSanitizer()
  • Method Details

    • isSensitive

      public static boolean isSensitive(String fieldName)
      Test if name is sensitive
      Parameters:
      fieldName - - name of the field, eg. user_password, userPassword, pwd, logonToken etc.
      Returns:
    • sanitizeIfNameIsSensitive

      public static String sanitizeIfNameIsSensitive(String fieldName, String value)
      Replace sensitive information in value if the name is on the sensitive keywords list
      Parameters:
      fieldName - - name of the field/configuration key, eg. user_password, userPassword, pwd, logonToken etc.
      value - - value to replace
      Returns:
      - asterisk if name is sensitive otherwise the value