Skip to content

Commit

Permalink
Remove GCP from supplied callback example
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeredit committed Sep 13, 2024
1 parent b133d71 commit e41872c
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 @@ -583,16 +583,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(context.TODO(), opts)
Expand Down

0 comments on commit e41872c

Please sign in to comment.