Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Login ¶
Login will check if the given username and password authenticate correctly with server given by config. username can be in the sAMAccountName or userPrincipalName format. If group is not an empty string then Login will verify that the user is in the Active Directory Group with the Common Name group. error will be non-nil if some sort of server error occurred.
Types ¶
type Config ¶
type Config struct { Server string Port int BaseDN string Security SecurityType TLSConfig *tls.Config Debug bool //debug messages are written to stdout }
Config contains settings for connecting to an Active Directory server
type ConfigError ¶
type ConfigError string
ConfigError is an error resulting from a bad Config
func (ConfigError) Error ¶
func (c ConfigError) Error() string
type SecurityType ¶
type SecurityType int
SecurityType specifies how to connect to an Active Directory server
const ( SecurityNone SecurityType = iota SecurityTLS SecurityStartTLS )
Security will default to SecurityNone if not given.
Click to show internal directories.
Click to hide internal directories.