@@ -35,49 +35,10 @@ Enterprise Edition:
35
35
For more information on establishing a connection to your MongoDB cluster, read our
36
36
:ref:`Connection Guide <kotlin-sync-connect>`.
37
37
38
-
39
- Specify an Authentication Mechanism
40
- -----------------------------------
41
-
42
- You can specify your authentication mechanism and credentials when connecting
43
- to MongoDB using either of the following:
44
-
45
- - A connection string
46
- - A ``MongoCredential`` factory method
47
-
48
- A **connection string** (also known as a **connection URI**) specifies how to
49
- connect and authenticate to your MongoDB cluster.
50
-
51
- To authenticate using a connection string, include your settings in your
52
- connection string and pass it to the ``MongoClient.create()`` method to
53
- instantiate your ``MongoClient``. The :guilabel:`Connection String`
54
- tab in each section provides the syntax for authenticating using a
55
- **connection string**.
56
-
57
- Alternatively, you can use the ``MongoCredential`` class to specify your
58
- authentication details. The ``MongoCredential`` class contains static factory
59
- methods that construct instances containing your authentication mechanism and
60
- credentials. When you use the ``MongoCredential`` helper class, you need
61
- to use the ``MongoClientSettings.Builder`` class to configure your
62
- connection settings when constructing your ``MongoClient``. The
63
- :guilabel:`MongoCredential` tab in each section provides the syntax for
64
- authenticating using a ``MongoCredential``.
65
-
66
- For more information on these classes and methods, refer to the following API
67
- documentation:
68
-
69
- - `MongoClient.create() <{+api+}/com.mongodb.kotlin.client/-mongo-client/-factory/index.html>`__
70
- - `MongoClient <{+api+}/com.mongodb.kotlin.client/-mongo-client/index.html>`__
71
- - `MongoClientSettings.Builder <{+java-api+}/apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.Builder.html>`__
72
- - `MongoCredential <{+java-api+}/apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html>`__
73
-
74
- Mechanisms
75
- ----------
76
-
77
38
.. _gssapi-auth-mechanism:
78
39
79
40
Kerberos (GSSAPI)
80
- ~~~~~~~~~~~~~~~~~
41
+ -----------------
81
42
82
43
The Generic Security Services API (``GSSAPI``) authentication mechanism
83
44
allows the user to authenticate to a Kerberos service using the user's
@@ -272,7 +233,7 @@ to improve performance.
272
233
.. _plain-auth-mechanism:
273
234
274
235
LDAP (PLAIN)
275
- ~~~~~~~~~~~~
236
+ ------------
276
237
277
238
*Available in MongoDB Enterprise Edition 3.4 and later.*
278
239
@@ -341,7 +302,7 @@ mechanism:
341
302
.. _kotlin-oidc:
342
303
343
304
MONGODB-OIDC
344
- ~~~~~~~~~~~~
305
+ ------------
345
306
346
307
.. important::
347
308
@@ -359,7 +320,7 @@ in the MongoDB Server manual.
359
320
.. _kotlin-mongodb-oidc-azure-imds:
360
321
361
322
Azure IMDS
362
- ++++++++++
323
+ ~~~~~~~~~~
363
324
364
325
If your application runs on an Azure VM, or otherwise uses the
365
326
`Azure Instance Metadata Service <https://learn.microsoft.com/en-us/azure/virtual-machines/instance-metadata-service>`__
@@ -411,7 +372,7 @@ see the corresponding syntax.
411
372
.. _kotlin-mongodb-oidc-gcp-imds:
412
373
413
374
GCP IMDS
414
- ++++++++
375
+ ~~~~~~~~
415
376
416
377
If your application runs on a Google Compute Engine VM, or otherwise uses the
417
378
`GCP Instance Metadata Service <https://cloud.google.com/compute/docs/metadata/querying-metadata>`__,
@@ -459,7 +420,7 @@ see the corresponding syntax.
459
420
:end-before: end-oidc-gcp-mongo-cred
460
421
461
422
Custom Callback
462
- +++++++++++++++
423
+ ~~~~~~~~~~~~~~~
463
424
464
425
The {+driver-short+} doesn't offer built-in support for all platforms, including
465
426
Azure Functions and Azure Kubernetes Service (AKS). Instead, you
@@ -485,3 +446,14 @@ named ``"access-token.dat"`` in the local file system:
485
446
:dedent:
486
447
:start-after: start-oidc-custom-callback-ex
487
448
:end-before: end-oidc-custom-callback-ex
449
+
450
+ API Documentation
451
+ -----------------
452
+
453
+ To learn more about the classes and methods for authenticating your application
454
+ with {+driver-short+}, see the following API documentation:
455
+
456
+ - `MongoClient.create() <{+api+}/com.mongodb.kotlin.client/-mongo-client/-factory/index.html>`__
457
+ - `MongoClient <{+api+}/com.mongodb.kotlin.client/-mongo-client/index.html>`__
458
+ - `MongoClientSettings.Builder <{+java-api+}/apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.Builder.html>`__
459
+ - `MongoCredential <{+java-api+}/apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html>`__
0 commit comments