- if provider == nil then
- log("debug", "auth provider is nil");
- else
- log("debug", "auth provider is not nil");
- end
- if provider.name == nil then
- log("debug", "authentication provider name is nil");
- else
- log("debug", "authentication provider name = '%s'", provider.name);
- end
- if config.get(host, "core", "authentication") == nil and provider.name == "default" then
- host_session.users = provider;
- elseif config.get(host, "core", "authentication") == provider.name then
+ local auth_provider = config.get(host, "core", "authentication") or default_provider;
+ if provider.name == auth_provider then