auth

package
v2.0.0-...-24ab28e Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

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

func NewCredentials

func NewCredentials(p *conf.Poller, logger *logging.Logger) *Credentials

func (*Credentials) Expire

func (c *Credentials) Expire()

Expire will reset the credential schedule if the receiver has a CredentialsScript Otherwise it will do nothing. Resetting the schedule will cause the next call to Password to fetch the credentials

func (*Credentials) GetPollerAuth

func (c *Credentials) GetPollerAuth() (PollerAuth, error)

func (*Credentials) Transport

func (c *Credentials) Transport(request *http.Request) (*http.Transport, error)

type PollerAuth

type PollerAuth struct {
	Username             string
	Password             string
	IsCert               bool
	HasCredentialScript  bool
	HasCertificateScript bool
	Schedule             string
	PemCert              []byte
	PemKey               []byte
	CertPath             string
	KeyPath              string
	CaCertPath           string
	// contains filtered or unexported fields
}

func (PollerAuth) Certificate

func (a PollerAuth) Certificate() (tls.Certificate, error)

type ScriptResponse

type ScriptResponse struct {
	Username string `yaml:"username"`
	Data     string `yaml:"password"`
}

Jump to

Keyboard shortcuts

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