Censors class
A class representing a set of rules to censor elements from requests and responses.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
applyBodyParameterCensors(
String body, ContentType contentType) → String -
Applies the body parameter censors to the given
body
with the givencontentType
. -
applyHeaderCensors(
Map< String, String?> ? headers) → Map<String, String> -
Applies the header censors to the given
headers
. -
applyQueryCensors(
String url) → String -
Applies the query parameter censors to the given
url
. -
censorBodyElements(
List< CensorElement> elements) → Censors -
Add the given
element
to the list of elements to censor from request bodies. -
censorBodyElementsByKeys(
List< String> keys, {bool caseSensitive = false}) → Censors -
Add the given
keys
to the list of elements to censor from request bodies. -
censorHeaderElements(
List< CensorElement> elements) → Censors -
Add the given
element
to the list of elements to censor from request headers. -
censorHeaderElementsByKeys(
List< String> keys, {bool caseSensitive = false}) → Censors -
Add the given
keys
to the list of elements to censor from request headers. -
censorQueryElements(
List< CensorElement> elements) → Censors -
Add the given
element
to the list of elements to censor from request query parameters. -
censorQueryElementsByKeys(
List< String> keys, {bool caseSensitive = false}) → Censors -
Add the given
keys
to the list of elements to censor from request query parameters. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- defaultCensors → Censors
-
A pre-configured instance of Censors that censors nothing.
no setter
- defaultCredentialCensors → Censors
-
A pre-configured instance of Censors that censors common credential data.
no setter
Static Methods
-
censorJsonData(
String body, String censorString, List< CensorElement> elementsToCensor) → String -
Censors the given
elementsToCensor
in the givenbody
with the givencensorString
. -
censorList(
List list, String censorString, List< CensorElement> elementsToCensor) → List -
Censors the given
elementsToCensor
in the givenlist
with the givencensorString
. -
censorMap(
Map< String, dynamic> map, String censorString, List<CensorElement> elementsToCensor) → Map<String, dynamic> -
Censors the given
elementsToCensor
in the givenmap
with the givencensorString
. -
elementShouldBeCensored(
String foundKey, List< CensorElement> elementsToCensor) → bool -
Returns true if the given
foundKey
exists in the givenelementsToCensor
list.