We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b133d71 commit 6bcc3dcCopy full SHA for 6bcc3dc
mongo/client_examples_test.go
@@ -583,16 +583,11 @@ func ExampleConnect_oIDC() {
583
}, nil
584
}
585
uri := os.Getenv("MONGODB_URI")
586
- props := map[string]string{
587
- "ENVIRONMENT": "gcp",
588
- "TOKEN_RESOURCE": "<audience>",
589
- }
590
opts := options.Client().ApplyURI(uri)
591
opts.SetAuth(
592
options.Credential{
593
- AuthMechanism: "MONGODB-OIDC",
594
- AuthMechanismProperties: props,
595
- OIDCMachineCallback: eksCallback,
+ AuthMechanism: "MONGODB-OIDC",
+ OIDCMachineCallback: eksCallback,
596
},
597
)
598
c, err := mongo.Connect(context.TODO(), opts)
0 commit comments