middleware

package
v0.0.0-...-a5f9fc7 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAuthenticationHeader

func AddAuthenticationHeader(
	authenticator auth.Authenticator,
	config configuration.Configuration,
	request *http.Request,
) error

func ApplyTlsConfig

func ApplyTlsConfig(transport *http.Transport, insecure bool, caPool *x509.CertPool) *http.Transport

func ConfigureProxy

func ConfigureProxy(
	transport *http.Transport,
	logger *zerolog.Logger,
	proxy func(req *http.Request) (*url.URL, error),
	authenticationMechanism httpauth.AuthenticationMechanism,
) *http.Transport

func ShouldRequireAuthentication

func ShouldRequireAuthentication(
	apiUrl string,
	url *url.URL,
	additionalSubdomains []string,
	additionalUrls []string,
) (matchesPattern bool, err error)

Types

type AuthHeaderMiddleware

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

func NewAuthHeaderMiddleware

func NewAuthHeaderMiddleware(
	config configuration.Configuration,
	authenticator auth.Authenticator,
	roundTripper http.RoundTripper,
) *AuthHeaderMiddleware

func (*AuthHeaderMiddleware) RoundTrip

func (n *AuthHeaderMiddleware) RoundTrip(request *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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