Skip to content

Commit 8103ae1

Browse files
expose authenticator (#123)
2 parents c8d714b + 2c788e0 commit 8103ae1

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

connector.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"strings"
99
"time"
1010

11+
"github.com/databricks/databricks-sql-go/auth"
1112
"github.com/databricks/databricks-sql-go/auth/pat"
1213
"github.com/databricks/databricks-sql-go/driverctx"
1314
dbsqlerr "github.com/databricks/databricks-sql-go/errors"
@@ -206,3 +207,10 @@ func WithSessionParams(params map[string]string) connOption {
206207
c.SessionParams = params
207208
}
208209
}
210+
211+
// WithAuthenticator sets up the Authentication. Mandatory if access token is not provided.
212+
func WithAuthenticator(authr auth.Authenticator) connOption {
213+
return func(c *config.Config) {
214+
c.Authenticator = authr
215+
}
216+
}

0 commit comments

Comments
 (0)