Skip to content

Commit

Permalink
- New censor set for common credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
nwithan8 committed Feb 7, 2023
1 parent cb08ad8 commit 90e3128
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/src/censors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:dartvcr/src/utilities.dart';
import 'package:dartvcr/src/vcr_exception.dart';

import 'censor_element.dart';
import 'defaults.dart';
import 'internal_utilities/content_type.dart';

/// A class representing a set of rules to censor elements from requests and responses.
Expand Down Expand Up @@ -282,4 +283,11 @@ class Censors {
static Censors get defaultCensors {
return Censors();
}

/// A pre-configured instance of [Censors] that censors common credential data.
static Censors get defaultCredentialCensors {
return Censors()
.censorQueryElementsByKeys(credentialParametersToHide)
.censorHeaderElementsByKeys(credentialHeadersToHide);
}
}

0 comments on commit 90e3128

Please sign in to comment.