ldntlm

package
v6.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package ldntlm allows you to configure the SDK to connect to LaunchDarkly through a proxy server that uses NTLM authentication. The standard Go HTTP client proxy mechanism does not support this. The implementation uses this package: github.com/launchdarkly/go-ntlm-proxy-auth

See NewNTLMProxyHTTPClientFactory for more details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNTLMProxyHTTPClientFactory

func NewNTLMProxyHTTPClientFactory(proxyURL, username, password, domain string,
	options ...ldhttp.TransportOption) (func() *http.Client, error)

NewNTLMProxyHTTPClientFactory returns a factory function for creating an HTTP client that will connect through an NTLM-authenticated proxy server.

To use this with the SDK, pass the factory function to HTTPConfigurationBuilder.HTTPClientFactory:

clientFactory, err := ldntlm.NewNTLMProxyHTTPClientFactory("http://my-proxy.com", "username",
    "password", "domain")
if err != nil {
    // there's some configuration problem such as an invalid proxy URL
}
config := ld.Config{
    HTTP: ldcomponents.HTTPConfiguration().HTTPClientFactory(clientFactory),
}
client, err := ld.MakeCustomClient("sdk-key", config, 5*time.Second)

You can also specify TLS configuration options from the ldhttp package, if you are connecting to the proxy securely:

clientFactory, err := ldntlm.NewNTLMProxyHTTPClientFactory("http://my-proxy.com", "username",
    "password", "domain", ldhttp.CACertFileOption("extra-ca-cert.pem"))

Types

This section is empty.

Jump to

Keyboard shortcuts

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