isSensitiveName method

bool isSensitiveName(
  1. String name
)

Implementation

bool isSensitiveName(String name) {
  final normalized = _normalizedName(name);
  return normalized.endsWith('authorization') ||
      normalized.endsWith('cookie') ||
      normalized.endsWith('apikey') ||
      normalized.endsWith('privatekey') ||
      normalized.endsWith('accesskey') ||
      normalized.endsWith('signature') ||
      normalized == 'bearer' ||
      normalized == 'sig' ||
      normalized == 'hmac' ||
      normalized == 'csrf' ||
      normalized == 'xsrf' ||
      normalized.contains('password') ||
      normalized.contains('passwd') ||
      normalized.contains('secret') ||
      normalized.contains('token') ||
      normalized.contains('credential');
}