|
|
@ -8,11 +8,11 @@ package ldap |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"crypto/tls" |
|
|
|
"crypto/tls" |
|
|
|
|
|
|
|
"errors" |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
"strings" |
|
|
|
|
|
|
|
"net" |
|
|
|
"net" |
|
|
|
"net/url" |
|
|
|
"net/url" |
|
|
|
"errors" |
|
|
|
"strings" |
|
|
|
|
|
|
|
|
|
|
|
"gopkg.in/ldap.v2" |
|
|
|
"gopkg.in/ldap.v2" |
|
|
|
|
|
|
|
|
|
|
@ -21,7 +21,6 @@ import ( |
|
|
|
|
|
|
|
|
|
|
|
type SecurityProtocol int |
|
|
|
type SecurityProtocol int |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Basic LDAP authentication service
|
|
|
|
// Basic LDAP authentication service
|
|
|
|
type Source struct { |
|
|
|
type Source struct { |
|
|
|
Name string // canonical name (ie. corporate.ad)
|
|
|
|
Name string // canonical name (ie. corporate.ad)
|
|
|
@ -140,7 +139,6 @@ func dial(ls *Source) (*ldap.Conn, error) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if u.User != nil || u.Path != "" || u.Fragment != "" || u.RawQuery != "" || u.Opaque != "" { |
|
|
|
if u.User != nil || u.Path != "" || u.Fragment != "" || u.RawQuery != "" || u.Opaque != "" { |
|
|
|
return nil, errors.New("LDAP URLs (for now) do not support pathes, fragments, querries or opaque form") |
|
|
|
return nil, errors.New("LDAP URLs (for now) do not support pathes, fragments, querries or opaque form") |
|
|
|
} |
|
|
|
} |
|
|
|