Skip to content

Commit

Permalink
Update driver.go (#293)
Browse files Browse the repository at this point in the history
add condition to receive credentials json by string
  • Loading branch information
JuanCamilloAce authored Sep 30, 2024
1 parent f16d115 commit d6cc7e8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ func newConnector(d *Driver, dsn string) (*connector, error) {
if strval, ok := connectorConfig.params["credentials"]; ok {
opts = append(opts, option.WithCredentialsFile(strval))
}
if strval, ok := connectorConfig.params["credentialsjson"]; ok {
opts = append(opts, option.WithCredentialsJSON([]byte(strval)))
}
if strval, ok := connectorConfig.params["useplaintext"]; ok {
if val, err := strconv.ParseBool(strval); err == nil && val {
opts = append(opts, option.WithGRPCDialOption(grpc.WithInsecure()), option.WithoutAuthentication())
Expand Down

0 comments on commit d6cc7e8

Please sign in to comment.