Skip to content

Commit

Permalink
GODRIVER-2758 Remove GCP from supplied callback example [master] (#1810)
Browse files Browse the repository at this point in the history
Co-authored-by: Patrick Meredith <pmeredit@gmail.com>
  • Loading branch information
mongodb-drivers-pr-bot[bot] and pmeredit committed Sep 14, 2024
1 parent 7183c45 commit 92c3d6e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions mongo/client_examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,16 +574,11 @@ func ExampleConnect_oIDC() {
}, nil
}
uri := os.Getenv("MONGODB_URI")
props := map[string]string{
"ENVIRONMENT": "gcp",
"TOKEN_RESOURCE": "<audience>",
}
opts := options.Client().ApplyURI(uri)
opts.SetAuth(
options.Credential{
AuthMechanism: "MONGODB-OIDC",
AuthMechanismProperties: props,
OIDCMachineCallback: eksCallback,
AuthMechanism: "MONGODB-OIDC",
OIDCMachineCallback: eksCallback,
},
)
c, err := mongo.Connect(opts)
Expand Down

0 comments on commit 92c3d6e

Please sign in to comment.