working prototype
can push OTP request can push routes
This commit is contained in:
10
ldap.go
10
ldap.go
@@ -21,11 +21,12 @@ type ldapConfig struct {
|
||||
primaryAttribute string
|
||||
secondaryAttribute string
|
||||
validGroups []string
|
||||
otpType string
|
||||
mfaType string
|
||||
certAuth string
|
||||
ipMin net.IP
|
||||
ipMax net.IP
|
||||
upgradeFrom string
|
||||
routes []string
|
||||
}
|
||||
|
||||
func (l *ldapConfig) addIPRange(s string) error {
|
||||
@@ -69,11 +70,12 @@ func (conf *ldapConfig) Auth(logins []string, pass string) (e error, userOk, pas
|
||||
}
|
||||
}
|
||||
|
||||
if len(logins) != 1 {
|
||||
return errors.New("invalid login"), false, false, nil
|
||||
// no server ldap or multiple login should not happen here
|
||||
if len(logins) != 1 || len(conf.servers) == 0 {
|
||||
return nil, false, false, nil
|
||||
}
|
||||
attributes = logins
|
||||
|
||||
attributes = logins
|
||||
for _, s := range conf.servers {
|
||||
// we force ldaps because we can
|
||||
l, err := myDialTLS("tcp", s+":636", &tls.Config{ServerName: s})
|
||||
|
||||
Reference in New Issue
Block a user