#include "webfused/auth/factory.h" #include "webfused/auth/file_authenticator.h" #include "webfused/auth/pam_authenticator.h" #include "webfused/config/settings.h" #include "webfused/log/log.h" #include bool wfd_authenticator_create( char const * provider, struct wfd_settings * settings, struct wfd_authenticator * authenticator) { bool result = false; if (0 == strcmp("file", provider)) { result = wfd_file_authenticator_create(settings, authenticator); } else if (0 == strcmp("pam", provider)) { result = wfd_pam_authenticator_create(settings, authenticator); } else { WFD_ERROR("failed to create authenticator: unknown type \"%s\"", provider); } return result; }