From 3fed069cc1928a9bd2c2ec2710a3b765dee9dc12 Mon Sep 17 00:00:00 2001 From: Chris Cho Date: Thu, 24 Aug 2023 16:05:07 -0400 Subject: [PATCH] DOCSP-32565: Fix the AWS refresh credentials example --- source/fundamentals/auth.txt | 2 +- source/includes/fundamentals/code-snippets/MongoDbAwsAuth.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/fundamentals/auth.txt b/source/fundamentals/auth.txt index cd965ce31..9d2a20fe6 100644 --- a/source/fundamentals/auth.txt +++ b/source/fundamentals/auth.txt @@ -489,7 +489,7 @@ that returns new credentials as shown in the following example: :dedent: :start-after: start refreshCredentials :end-before: end refreshCredentials - :emphasize-lines: 4-5,9 + :emphasize-lines: 4-5,8-9 .. note:: diff --git a/source/includes/fundamentals/code-snippets/MongoDbAwsAuth.java b/source/includes/fundamentals/code-snippets/MongoDbAwsAuth.java index 0f323038b..f2678ac96 100644 --- a/source/includes/fundamentals/code-snippets/MongoDbAwsAuth.java +++ b/source/includes/fundamentals/code-snippets/MongoDbAwsAuth.java @@ -108,7 +108,7 @@ private static void refreshCredentials() { return new AwsCredential("", "", ""); }; - MongoCredential credential = MongoCredential.createAwsCredential("", "".toCharArray()) + MongoCredential credential = MongoCredential.createAwsCredential(null, null) .withMechanismProperty(MongoCredential.AWS_CREDENTIAL_PROVIDER_KEY, awsFreshCredentialSupplier); MongoClient mongoClient = MongoClients.create( MongoClientSettings.builder()