@@ -445,30 +445,19 @@ Windows
445
445
446
446
.. code-block:: python
447
447
448
- <<<<<<< HEAD
449
- client = pymongo.MongoClient("mongodb://<hostname>:<port>",
450
- username="<db_username>",
451
- authMechanism="GSSAPI",
452
- password="<db_password>",
453
- authMechanismProperties="SERVICE_NAME:<authentication service name>,
454
- CANONICALIZE_HOST_NAME:true,
455
- SERVICE_REALM:<service realm>")
456
- =======
457
448
client = pymongo.MongoClient("mongodb://<hostname>:<port>",
458
449
username="<username>",
459
450
authMechanism="GSSAPI",
460
451
password="<password>",
461
452
authMechanismProperties="SERVICE_NAME:<authentication service name>,
462
453
CANONICALIZE_HOST_NAME:true,
463
454
SERVICE_REALM:<service realm>")
464
- >>>>>>> fc4211c (DOCSP-48719: Update non-Mongo credential placeholders (#240))
465
455
466
456
.. tab:: Connection String
467
457
:tabid: connectionstring
468
458
469
459
.. code-block:: python
470
460
471
- <<<<<<< HEAD
472
461
uri = ("mongodb://<percent-encoded username>:<percent-encoded user password>"
473
462
"@<hostname>:<port>/?"
474
463
"&authMechanism=GSSAPI"
@@ -477,43 +466,6 @@ Windows
477
466
"CANONICALIZE_HOST_NAME:true,"
478
467
"SERVICE_REALM:<service realm>")
479
468
client = pymongo.MongoClient(uri)
480
- =======
481
- uri = ("mongodb://<percent-encoded username>:<percent-encoded user password>"
482
- "@<hostname>:<port>/?"
483
- "&authMechanism=GSSAPI"
484
- "&authMechanismProperties="
485
- "SERVICE_NAME:<authentication service name>,"
486
- "CANONICALIZE_HOST_NAME:true,"
487
- "SERVICE_REALM:<service realm>")
488
- client = pymongo.MongoClient(uri)
489
-
490
- .. tab:: MongoClient (Asynchronous)
491
- :tabid: mongoclient-async
492
-
493
- .. code-block:: python
494
-
495
- client = pymongo.AsyncMongoClient("mongodb://<hostname>:<port>",
496
- username="<username>",
497
- authMechanism="GSSAPI",
498
- password="<password>",
499
- authMechanismProperties="SERVICE_NAME:<authentication service name>,
500
- CANONICALIZE_HOST_NAME:true,
501
- SERVICE_REALM:<service realm>")
502
-
503
- .. tab:: Connection String (Asynchronous)
504
- :tabid: connectionstring-async
505
-
506
- .. code-block:: python
507
-
508
- uri = ("mongodb://<percent-encoded username>:<percent-encoded user password>"
509
- "@<hostname>:<port>/?"
510
- "&authMechanism=GSSAPI"
511
- "&authMechanismProperties="
512
- "SERVICE_NAME:<authentication service name>,"
513
- "CANONICALIZE_HOST_NAME:true,"
514
- "SERVICE_REALM:<service realm>")
515
- client = pymongo.AsyncMongoClient(uri)
516
- >>>>>>> fc4211c (DOCSP-48719: Update non-Mongo credential placeholders (#240))
517
469
518
470
To learn more about authenticating with Kerberos, see
519
471
:ref:`pymongo-kerberos` in the Enterprise Authentication guide.
0 commit comments