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

Method speculate_command

pymongo/asynchronous/auth.py:410–416  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

408 self.mechanism = mechanism
409
410 def speculate_command(self) -> Optional[MutableMapping[str, Any]]:
411 nonce, first_bare, cmd = _authenticate_scram_start(self.credentials, self.mechanism)
412 # The 'db' field is included only on the speculative command.
413 cmd["db"] = self.credentials.source
414 # Save for later use.
415 self.scram_data = (nonce, first_bare)
416 return cmd
417
418
419class _X509Context(_AuthContext):

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected