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.