Skip to content

Commit

Permalink
Merge pull request #156 from overmindtech/connect-as
Browse files Browse the repository at this point in the history
Use account-aware sdp-go version
  • Loading branch information
DavidS-ovm authored Jul 26, 2023
2 parents 61aafe2 + 615da94 commit 8bd3d89
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ func (e *Engine) AddSources(sources ...Source) {
// Connect Connects to NATS
func (e *Engine) connect() error {
// Try to connect to NATS
if no := e.NATSOptions; no != nil {
ec, err := e.NATSOptions.Connect()
if e.NATSOptions != nil {
ec, err := e.NATSOptions.ConnectAs("") // rely on the underlying API key's identity

if err != nil {
return err
Expand Down
1 change: 0 additions & 1 deletion engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,6 @@ func GetTestOAuthTokenClient(t *testing.T) auth.TokenClient {
ccc := auth.ClientCredentialsConfig{
ClientID: clientID,
ClientSecret: clientSecret,
Account: "org_hdeUXbB55sMMvJLa",
}

return auth.NewOAuthTokenClient(
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/goombaio/namegenerator v0.0.0-20181006234301-989e774b106e
github.com/nats-io/nats-server/v2 v2.9.20
github.com/nats-io/nats.go v1.28.0
github.com/overmindtech/sdp-go v0.39.3
github.com/overmindtech/sdp-go v0.41.0
github.com/overmindtech/sdpcache v1.5.0
github.com/sirupsen/logrus v1.9.3
github.com/sourcegraph/conc v0.3.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/overmindtech/api-client v0.14.0 h1:zXyjJsIeawNqoWv7FqOjwcqgFpLrDYz7l9MWqh1G9ZQ=
github.com/overmindtech/api-client v0.14.0/go.mod h1:msdkTAQFlvDGOU4tQk2adk2P8j23uaMWkJ9YRX4wGWI=
github.com/overmindtech/sdp-go v0.39.3 h1:P9D7pWPqqawoyjacYNZPWVxGVMkw9Ymi5XcX5yrqfcs=
github.com/overmindtech/sdp-go v0.39.3/go.mod h1:fwGtzDA7h//c+QBnOhRa7KQRt1RFFWMPnVndH+39GLs=
github.com/overmindtech/sdp-go v0.41.0 h1:eIBLblW2MDCCEk7ZSPk6sFo/1piMzba1+nUDa722vOo=
github.com/overmindtech/sdp-go v0.41.0/go.mod h1:fwGtzDA7h//c+QBnOhRa7KQRt1RFFWMPnVndH+39GLs=
github.com/overmindtech/sdpcache v1.5.0 h1:QzHWQm1KGN9rNHPb/VZvz7WDCsyKOuVLlNUGF2CIFGc=
github.com/overmindtech/sdpcache v1.5.0/go.mod h1:GFMMle860EWMDQXbk6dhLVSQrV0YlEqqJ6/VNxINb0o=
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
Expand Down

0 comments on commit 8bd3d89

Please sign in to comment.