MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _is_speculative_authenticate

Function _is_speculative_authenticate

pymongo/monitoring.py:517–523  ·  view source on GitHub ↗
(command_name: str, doc: Mapping[str, Any])

Source from the content-addressed store, hash-verified

515# The "hello" command is also deemed sensitive when attempting speculative
516# authentication.
517def _is_speculative_authenticate(command_name: str, doc: Mapping[str, Any]) -> bool:
518 if (
519 command_name.lower() in ("hello", HelloCompat.LEGACY_CMD)
520 and "speculativeAuthenticate" in doc
521 ):
522 return True
523 return False
524
525
526class _CommandEvent:

Callers 4

commandFunction · 0.90
commandFunction · 0.90
__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected