(
creds: MongoCredential, address: tuple[str, int]
)
| 382 | |
| 383 | @staticmethod |
| 384 | def from_credentials( |
| 385 | creds: MongoCredential, address: tuple[str, int] |
| 386 | ) -> Optional[_AuthContext]: |
| 387 | spec_cls = _SPECULATIVE_AUTH_MAP.get(creds.mechanism) |
| 388 | if spec_cls: |
| 389 | return cast(_AuthContext, spec_cls(creds, address)) |
| 390 | return None |
| 391 | |
| 392 | def speculate_command(self) -> Optional[MutableMapping[str, Any]]: |
| 393 | raise NotImplementedError |