diff --git a/outpost/cmd/ldap/server.go b/outpost/cmd/ldap/server.go index 181a4eafb..e78924e93 100644 --- a/outpost/cmd/ldap/server.go +++ b/outpost/cmd/ldap/server.go @@ -52,13 +52,14 @@ func main() { ac.Server = ldap.NewServer(ac) - ac.Start() + err = ac.Start() + if err != nil { + log.WithError(err).Panic("Failed to run server") + } for { - select { - case <-interrupt: - ac.Shutdown() - os.Exit(0) - } + <-interrupt + ac.Shutdown() + os.Exit(0) } } diff --git a/outpost/pkg/ldap/utils.go b/outpost/pkg/ldap/utils.go index 35b454297..e266e7e2a 100644 --- a/outpost/pkg/ldap/utils.go +++ b/outpost/pkg/ldap/utils.go @@ -8,11 +8,11 @@ func AKAttrsToLDAP(attrs interface{}) []*ldap.EntryAttribute { attrList := []*ldap.EntryAttribute{} for attrKey, attrValue := range attrs.(map[string]interface{}) { entry := &ldap.EntryAttribute{Name: attrKey} - switch attrValue.(type) { + switch t := attrValue.(type) { case []string: - entry.Values = attrValue.([]string) + entry.Values = t case string: - entry.Values = []string{attrValue.(string)} + entry.Values = []string{t} } attrList = append(attrList, entry) } diff --git a/web/src/pages/providers/ldap/LDAPProviderForm.ts b/web/src/pages/providers/ldap/LDAPProviderForm.ts index e9d815ec5..137096132 100644 --- a/web/src/pages/providers/ldap/LDAPProviderForm.ts +++ b/web/src/pages/providers/ldap/LDAPProviderForm.ts @@ -1,4 +1,4 @@ -import { CryptoApi, FlowDesignationEnum, FlowsApi, ProvidersApi, LDAPProvider } from "authentik-api"; +import { FlowDesignationEnum, FlowsApi, ProvidersApi, LDAPProvider } from "authentik-api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html";