auth

package
v0.10.11 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUTHTYPE_COUCHDB_SESSION = "COUCHDB_SESSION"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CouchDbSessionAuthenticator

type CouchDbSessionAuthenticator struct {
	// [Required] The username and password used to access CouchDB session end-point
	Username, Password string

	// CouchDB URL inherited from the service request.
	URL string

	// A flag that indicates whether verification of the server's SSL certificate should be disabled
	DisableSSLVerification bool
	// contains filtered or unexported fields
}

CouchDbSessionAuthenticator uses username and password to obtain CouchDB authentication cookie, and adds the cookie to requests.

func NewCouchDbSessionAuthenticator

func NewCouchDbSessionAuthenticator(username, password string) (*CouchDbSessionAuthenticator, error)

NewCouchDbSessionAuthenticator constructs a new NewCouchDbSessionAuthenticator instance.

func NewCouchDbSessionAuthenticatorFromMap

func NewCouchDbSessionAuthenticatorFromMap(props map[string]string) (*CouchDbSessionAuthenticator, error)

NewCouchDbSessionAuthenticatorFromMap constructs a new NewCouchDbSessionAuthenticator instance from a map.

func (*CouchDbSessionAuthenticator) Authenticate

func (a *CouchDbSessionAuthenticator) Authenticate(request *http.Request) error

Authenticate adds session authentication cookie to a request.

func (*CouchDbSessionAuthenticator) AuthenticationType

func (a *CouchDbSessionAuthenticator) AuthenticationType() string

AuthenticationType returns the authentication type for this authenticator.

func (*CouchDbSessionAuthenticator) SetClient added in v0.5.0

func (a *CouchDbSessionAuthenticator) SetClient(client *http.Client)

SetClient sets the http client for the authenticator.

func (*CouchDbSessionAuthenticator) Validate

func (a *CouchDbSessionAuthenticator) Validate() error

Validate the authenticator's configuration. Ensures the service url, username and password are valid and not nil.

Jump to

Keyboard shortcuts

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