authn

package
v0.400.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthenticationHeaders

func GetAuthenticationHeaders(ctx context.Context, endpoint *url.URL, authenticators map[string]string) (http.Header, error)

GetAuthenticationHeaders returns authentication headers for the given endpoint.

"authenticators" are authenticator executables to use for each endpoint. The key is the URL of the endpoint, the value is the name/path of the authenticator executable. The authenticator executable will be called with the URL as the first argument, and output a list of headers to stdout to use for authentication.

If the endpoint is already authenticated, the existing credentials will be returned. Additionally, credentials will be cached across runs in the keyring.

func Transport

func Transport(next http.RoundTripper, authenticators map[string]string) http.RoundTripper

Transport returns a transport that will authenticate requests to the given endpoints.

Types

This section is empty.

Jump to

Keyboard shortcuts

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