{"modulePath":"github.com/stackdocker/gogs","version":"v0.9.13","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package ldap\n\nPackage ldap provide functions \u0026 structure to query a LDAP ldap directory For now, it's mainly tested again an MS Active Directory service, see README.md for more information\n\n## Types\n\n```go\ntype Source struct {\n\tName              string // canonical name (ie. corporate.ad)\n\tHost              string // LDAP host\n\tPort              int    // port number\n\tUseSSL            bool   // Use SSL\n\tSkipVerify        bool\n\tBindDN            string // DN to bind with\n\tBindPassword      string // Bind DN password\n\tUserBase          string // Base search path for users\n\tUserDN            string // Template for the DN of the user for simple auth\n\tAttributeUsername string // Username attribute\n\tAttributeName     string // First name attribute\n\tAttributeSurname  string // Surname attribute\n\tAttributeMail     string // E-mail attribute\n\tAttributesInBind  bool   // fetch attributes in bind context (not user)\n\tFilter            string // Query filter to validate entry\n\tAdminFilter       string // Query filter to check if user is admin\n\tEnabled           bool   // if this source is disabled\n}\n```\nBasic LDAP authentication service\n\n```go\nfunc (ls *Source) SearchEntry(name, passwd string, directBind bool) (string, string, string, string, bool, bool)\n```\nsearchEntry : search an LDAP source if an entry (name, passwd) is valid and in the specific filter\n\n","path":"github.com/stackdocker/gogs/modules/auth/ldap","name":"ldap","synopsis":"Package ldap provide functions \u0026 structure to query a LDAP ldap directory For now, it's mainly tested again an MS Active Directory service, see README.md for more information","isRedistributable":true}
