File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const (
1818 AuthTypeOauthM2M
1919)
2020
21- var authTypeNames []string = []string {"Unknown" , "Pat" , "OauthU2m " , "OauthM2M" }
21+ var authTypeNames []string = []string {"Unknown" , "Pat" , "OauthU2M " , "OauthM2M" }
2222
2323func (at AuthType ) String () string {
2424 if at >= 0 && int (at ) < len (authTypeNames ) {
Original file line number Diff line number Diff line change @@ -261,6 +261,7 @@ func WithMaxDownloadThreads(numThreads int) connOption {
261261 }
262262}
263263
264+ // Setup of Oauth M2m authentication
264265func WithClientCredentials (clientID , clientSecret string ) connOption {
265266 return func (c * config.Config ) {
266267 if clientID != "" && clientSecret != "" {
Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ Supported optional connection parameters can be specified in param=value and inc
3939 - userAgentEntry: Used to identify partners. Set as a string with format <isv-name+product-name>
4040 - useCloudFetch: Used to enable cloud fetch for the query execution. Default is false
4141 - maxDownloadThreads: Sets up the max number of concurrent workers for cloud fetch. Default is 10
42+ - authType: Specifies the desired authentication type. Valid values are: Pat, OauthM2M, OauthU2M
43+ - accessToken: Personal access token. Required if authType set to Pat
44+ - clientID: Specifies the client ID to use with OauthM2M
45+ - clientSecret: Specifies the client secret to use with OauthM2M
4246
4347Supported optional session parameters can be specified in param=value and include:
4448
@@ -83,6 +87,8 @@ Supported functional options include:
8387 - WithUserAgentEntry(<isv-name+product-name> string). Used to identify partners. Optional
8488 - WithCloudFetch (bool). Used to enable cloud fetch for the query execution. Default is false. Optional
8589 - WithMaxDownloadThreads (<num_threads> int). Sets up the max number of concurrent workers for cloud fetch. Default is 10. Optional
90+ - WithAuthenticator (<authenticator> auth.Authenticator). Sets up authentication. Required if neither access token or client credentials are provided.
91+ - WithClientCredentials(<clientID> string, <clientSecret> string). Sets up Oauth M2M authentication.
8692
8793# Query cancellation and timeout
8894
You can’t perform that action at this time.
0 commit comments