forked from forgejo/forgejo
golint fixed for modules/auth
This commit is contained in:
parent
e6da2cf2cb
commit
ec87a75c00
16 changed files with 103 additions and 24 deletions
|
@ -16,6 +16,7 @@ import (
|
|||
"code.gitea.io/gitea/modules/log"
|
||||
)
|
||||
|
||||
// SecurityProtocol protocol type
|
||||
type SecurityProtocol int
|
||||
|
||||
// Note: new type must be added at the end of list to maintain compatibility.
|
||||
|
@ -25,7 +26,7 @@ const (
|
|||
SecurityProtocolStartTLS
|
||||
)
|
||||
|
||||
// Basic LDAP authentication service
|
||||
// Source Basic LDAP authentication service
|
||||
type Source struct {
|
||||
Name string // canonical name (ie. corporate.ad)
|
||||
Host string // LDAP host
|
||||
|
@ -148,7 +149,7 @@ func bindUser(l *ldap.Conn, userDN, passwd string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// searchEntry : search an LDAP source if an entry (name, passwd) is valid and in the specific filter
|
||||
// SearchEntry : search an LDAP source if an entry (name, passwd) is valid and in the specific filter
|
||||
func (ls *Source) SearchEntry(name, passwd string, directBind bool) (string, string, string, string, bool, bool) {
|
||||
l, err := dial(ls)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue