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