auth

package
v1.23.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthFactory added in v1.16.0

type AuthFactory struct {
	// contains filtered or unexported fields
}

func NewAuthFactory added in v1.16.0

func NewAuthFactory() AuthFactory

func (AuthFactory) NewClientAuth added in v1.16.0

func (af AuthFactory) NewClientAuth(acct *accounts.Account) (AuthMethod, error)

type AuthMethod

type AuthMethod interface {
	AddAuthHeaders(req *http.Request) error
}

func NewApiKeyAuthenticator

func NewApiKeyAuthenticator(apiKey, headerName string) AuthMethod

NewApiKeyAuthenticator creates an AuthMethod that adds an Authorization header containing the provided API key. If headerName is non-empty, it will be used instead of "Authorization". Connect accepts both "Authorization" and "X-Rsc-Authorization" to support certain proxy configurations upstream of Connect.

func NewNullAuthenticator

func NewNullAuthenticator() AuthMethod

func NewPlainAuthenticator added in v1.18.1

func NewPlainAuthenticator(authValue string) AuthMethod

func NewSnowflakeAuthenticator added in v1.16.0

func NewSnowflakeAuthenticator(
	connections snowflake.Connections,
	connectionName string,
) (AuthMethod, error)

NewSnowflakeAuthenticator loads the Snowflake connection with the given name from the system Snowflake configuration and returns an authenticator that will add auth headers to requests.

Only supports keypair authentication.

Errs if the named connection cannot be found, or if the connection does not include a valid private key.

func NewTokenAuthenticator added in v1.19.0

func NewTokenAuthenticator(token, privateKey string) (AuthMethod, error)

NewTokenAuthenticator creates an AuthMethod that adds token-based authentication headers

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL