@@ -409,27 +409,16 @@ environment variable:
409
409
:start-after: start-custom-callback
410
410
:end-before: end-custom-callback
411
411
412
- Next, create a map to store your authentication
413
- mechanism properties, as shown in the following example. Replace
414
- the ``<audience>`` placeholder with the value of the ``audience``
415
- parameter configured on your MongoDB deployment.
416
-
417
- .. code-block:: go
418
-
419
- props := map[string]string{
420
- "TOKEN_RESOURCE": "<audience>",
421
- }
422
-
423
- Then, you can create a ``Credential`` struct that uses the properties
424
- map and the EKS callback function:
412
+ Then, you can create a ``Credential`` struct that uses the EKS callback
413
+ function that you defined:
425
414
426
415
.. literalinclude:: /includes/authentication/eks-custom-callback.go
427
416
:language: go
428
417
:dedent:
429
418
:copyable: true
430
419
:start-after: start-credential-callback
431
420
:end-before: end-credential-callback
432
- :emphasize-lines: 10
421
+ :emphasize-lines: 6
433
422
434
423
.. _golang-mongodb-oidc-azure-envs:
435
424
@@ -478,28 +467,16 @@ service-account token-file location:
478
467
:start-after: start-callback
479
468
:end-before: end-callback
480
469
481
- Next, create a map to store your authentication
482
- mechanism properties, as shown in the following example. Replace
483
- the ``<audience>`` placeholder with the value of the ``audience``
484
- parameter configured on your MongoDB deployment.
485
-
486
- .. code-block:: go
487
-
488
- props := map[string]string{
489
- "ENVIRONMENT": "gcp",
490
- "TOKEN_RESOURCE": "<audience>",
491
- }
492
-
493
- Then, you can create a ``Credential`` struct that uses the properties
494
- map and the GKE callback function:
470
+ Then, you can create a ``Credential`` struct that uses the the GKE
471
+ callback function that you defined:
495
472
496
473
.. literalinclude:: /includes/authentication/gke-callback.go
497
474
:language: go
498
475
:copyable: true
499
476
:dedent:
500
477
:start-after: start-credential-callback
501
478
:end-before: end-credential-callback
502
- :emphasize-lines: 11
479
+ :emphasize-lines: 6
503
480
504
481
Additional Information
505
482
----------------------
0 commit comments