mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 04:35:40 +00:00
fix: don't fail app if LDAP is not configured
This commit is contained in:
@@ -133,7 +133,10 @@ var rootCmd = &cobra.Command{
|
|||||||
SearchFilter: config.LdapSearchFilter,
|
SearchFilter: config.LdapSearchFilter,
|
||||||
}
|
}
|
||||||
ldapService, err = ldap.NewLDAP(ldapConfig)
|
ldapService, err = ldap.NewLDAP(ldapConfig)
|
||||||
HandleError(err, "Failed to create LDAP service")
|
if err != nil {
|
||||||
|
log.Error().Err(err).Msg("Failed to initialize LDAP service, disabling LDAP authentication")
|
||||||
|
ldapService = nil
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log.Info().Msg("LDAP not configured, using local users or OAuth")
|
log.Info().Msg("LDAP not configured, using local users or OAuth")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user