Authenticate using MONGODB-X509.
(credentials: MongoCredential, conn: Connection)
| 330 | |
| 331 | |
| 332 | def _authenticate_x509(credentials: MongoCredential, conn: Connection) -> None: |
| 333 | """Authenticate using MONGODB-X509.""" |
| 334 | ctx = conn.auth_ctx |
| 335 | if ctx and ctx.speculate_succeeded(): |
| 336 | # MONGODB-X509 is done after the speculative auth step. |
| 337 | return |
| 338 | |
| 339 | cmd = _X509Context(credentials, conn.address).speculate_command() |
| 340 | conn.command("$external", cmd) |
| 341 | |
| 342 | |
| 343 | def _authenticate_default(credentials: MongoCredential, conn: Connection) -> None: |
nothing calls this directly
no test coverage detected