Documentation ¶
Overview ¶
Package ntlm is an NTLMv1 client implementation.
NTLM session started with sending Negotiate() to server. Server then responds with challenge, use ParseChallenge to get neccecary bits from it. Then use Authenticate() to generate authentication string.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnsupportedAuth = fmt.Errorf("ntlm: unsupported authentication method") )
Functions ¶
func Authenticate ¶
Authenticate generates auth message.
func NewHTTPDialer ¶
func NewHTTPDialer(username, password, domain, url string) func(network, address string) (net.Conn, error)
NewHTTPDialer returns dial func which dials remote address, GETs specified url with ntlm authentication headers then returns connection, if response status was anything, but 401.
Usage:
client = &http.Client{ Transport: &http.Transport{ Dial: ntlm.NewHTTPDialer(username, password, domain, url), }, }
func ParseChallenge ¶
ParseChallenge parses challenge provided by peer.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.