Skip to content

Commit 9d5b3e3

Browse files
author
Chris Cho
authored
Merge pull request #46 from ccho-mongodb/120420-char-array
use toCharArray for password
2 parents 9dc18b0 + 502aebe commit 9d5b3e3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/includes/fundamentals/code-snippets/auth-credentials-aws-session.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. code-block:: java
22
3-
MongoCredential credential = MongoCredential.createAwsCredential("<username>", "<password>");
3+
MongoCredential credential = MongoCredential.createAwsCredential("<username>", "<password>".toCharArray());
44
String connectionString = "mongodb://<hostname>:<port>/?authSource=<authenticationDb>&authMechanism=MONGODB-AWS&authMechanismProperties=AWS_SESSION_TOKEN:<awsSessionToken>");
55
66
MongoClient mongoClient = MongoClients.create(

source/includes/fundamentals/code-snippets/auth-credentials-aws.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. code-block:: java
22
3-
MongoCredential credential = MongoCredential.createAwsCredential("<username>", "<password>");
3+
MongoCredential credential = MongoCredential.createAwsCredential("<username>", "<password>".toCharArray());
44
55
MongoClient mongoClient = MongoClients.create(
66
MongoClientSettings.builder()

0 commit comments

Comments
 (0)