Documentation ¶
Overview ¶
Package ntlmssp provides NTLM/Negotiate authentication over HTTP
Protocol details from https://msdn.microsoft.com/en-us/library/cc236621.aspx, implementation hints from http://davenport.sourceforge.net/ntlm.html . This package only implements authentication, no key exchange or encryption. It only supports Unicode (UTF16LE) encoding of protocol strings, no OEM encoding. This package implements NTLMv2.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNegotiateMessage ¶
NewNegotiateMessage creates a new NEGOTIATE message with the flags that this package supports.
Types ¶
type AvFlags ¶
type AvFlags uint32
const ( AvFlagAuthenticationConstrained AvFlags = 0x00000001 // Indicates to the client that the account authentication is constrained. AvFlagMICPresent AvFlags = 0x00000002 // Indicates that the client is providing message integrity in the MIC field (section 2.2.1.3) in the AUTHENTICATE_MESSAGE.<14> AvFlagUntrustedSPN AvFlags = 0x00000004 // Indicates that the client is providing a target SPN generated from an untrusted source.<15> )
type NegotiateFlags ¶
type NegotiateFlags uint32
func (NegotiateFlags) Has ¶
func (field NegotiateFlags) Has(flags NegotiateFlags) bool
func (*NegotiateFlags) Unset ¶
func (field *NegotiateFlags) Unset(flags NegotiateFlags)
type Negotiator ¶
type Negotiator struct{ http.RoundTripper }
Negotiator is a http.Roundtripper decorator that automatically converts basic authentication to NTLM/Negotiate authentication when appropriate.
type Version ¶
type Version struct { ProductMajorVersion uint8 ProductMinorVersion uint8 ProductBuild uint16 NTLMRevisionCurrent uint8 // contains filtered or unexported fields }
Version is a struct representing https://msdn.microsoft.com/en-us/library/cc236654.aspx
func DefaultVersion ¶
func DefaultVersion() Version
DefaultVersion returns a Version with "sensible" defaults (Windows 7)
func EmptyVersion ¶
func EmptyVersion() Version