Package io.realm.mongodb.log.obfuscator
Class HttpLogObfuscator
- java.lang.Object
-
- io.realm.mongodb.log.obfuscator.HttpLogObfuscator
-
public class HttpLogObfuscator extends Object
The HttpLogObfuscator keeps sensitive information from being displayed in Logcat.
-
-
Constructor Summary
Constructors Constructor Description HttpLogObfuscator(String feature, Map<String,io.realm.internal.log.obfuscator.RegexPatternObfuscator> patternObfuscatorMap)
Constructor for creating an HTTP log obfuscator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
String
obfuscate(List<String> urlSegments, String input)
Obfuscates a logcat entry or not depending on whether the request being sent matches the specified feature.
-
-
-
Constructor Detail
-
HttpLogObfuscator
public HttpLogObfuscator(String feature, Map<String,io.realm.internal.log.obfuscator.RegexPatternObfuscator> patternObfuscatorMap)
Constructor for creating an HTTP log obfuscator.- Parameters:
feature
- the feature to obfuscate, e.g. "providers" for login requests - seeLoggingInterceptor
.patternObfuscatorMap
-Map
of keys subject to being obfuscated andRegexPatternObfuscator
s used to determine which obfuscator has to be used for the given feature.
-
-
Method Detail
-
obfuscate
public String obfuscate(List<String> urlSegments, String input)
Obfuscates a logcat entry or not depending on whether the request being sent matches the specified feature. If it doesn't, the logcat entry will be returned unmodified.- Parameters:
urlSegments
- the URL segments of the request to be sent.input
- the original logcat entry.- Returns:
- the logcat entry to be shown in the logcat.
-
-