Skip to content

Commit d563156

Browse files
committed
fix typo and refine content
1 parent 2359487 commit d563156

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

source/fundamentals/enterprise-auth.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,21 +170,24 @@ If your application runs on a Google Compute Engine VM, or otherwise uses the
170170
you can authenticate to MongoDB by using the {+driver-short+}'s built-in GCP
171171
support.
172172

173-
You can configure the OIDC for GCP IMDS by setting the ``mechanism`` field of your
174-
``Credential`` struct to ``AuthMechanism::MongoDBOidc``. The following example
175-
specifies the authentication mechaism by using the following placeholders in the
173+
You can configure OIDC for GCP IMDS by setting the ``mechanism`` field of your
174+
``Credential`` struct to ``AuthMechanism::MongoDBOidc``. Then, specify the
175+
authentication mechanism by setting the following values in the
176176
``mechanism_properties`` field:
177177

178178
- ``ENVIRONMENT``: Set this property to ``gcp``.
179179
- ``TOKEN_RESOURCE``: Set this property to the value of the audience parameter configured
180180
on your MongoDB deployment.
181181

182+
The following code example shows how to set these options when creating a
183+
``Client``:
184+
182185
.. literalinclude:: /includes/fundamentals/code-snippets/enterprise-auth.rs
183186
:language: rust
184187
:dedent:
185188
:start-after: start-gcp-imds
186189
:end-before: end-gcp-imds
187-
:emphasize-lines: 2-3
190+
:emphasize-lines: 2-4
188191

189192
.. _rust-mongodb-oidc-custom-callback:
190193

@@ -218,8 +221,7 @@ following process:
218221
1. The driver retrieves the Identity Provider Information (IDPInfo) for the
219222
provided username.
220223
2. The callback negotiates with the IDP to obtain an ``AccessToken``, possible
221-
``RefreshToken``, and any timeouts. Then, it returns them, similar to the
222-
``OIDCMachineCallbacks``.
224+
``RefreshToken``, and any timeouts, then returns them.
223225

224226
The following example defines a custom callback to handle workforce identity.
225227
The callback retrieves the IDPInfo for the provided username and negotiates with

0 commit comments

Comments
 (0)