Class Sanitizer


  • public class Sanitizer
    extends Object
    Strategy that should be used by endpoint implementations to sanitize potentially sensitive keys.
    Since:
    2.0.0
    • Method Detail

      • setKeysToSanitize

        public void setKeysToSanitize​(String... keysToSanitize)
        Keys that should be sanitized. Keys can be simple strings that the property ends with or regular expressions.
        Parameters:
        keysToSanitize - the keys to sanitize
      • sanitize

        public Object sanitize​(String key,
                               Object value)
        Sanitize the given value if necessary.
        Parameters:
        key - the key to sanitize
        value - the value
        Returns:
        the potentially sanitized value