| 140 | ) |
| 141 | |
| 142 | def _is_sensitive(self, doc_name: str) -> bool: |
| 143 | is_speculative_authenticate = ( |
| 144 | self._kwargs.pop("speculative_authenticate", False) |
| 145 | or "speculativeAuthenticate" in self._kwargs[doc_name] |
| 146 | ) |
| 147 | is_sensitive_command = ( |
| 148 | "commandName" in self._kwargs and self._kwargs["commandName"] in _SENSITIVE_COMMANDS |
| 149 | ) |
| 150 | |
| 151 | is_sensitive_hello = ( |
| 152 | self._kwargs.get("commandName", None) in _HELLO_COMMANDS and is_speculative_authenticate |
| 153 | ) |
| 154 | |
| 155 | return is_sensitive_command or is_sensitive_hello |
| 156 | |
| 157 | def _redact(self) -> None: |
| 158 | if self._redacted: |