public async Task <ESDefaultProfileLoginDetails> TestLdapSettingsAsync(ESLdapAuthModuleSettings settings, string username, string password, Func <Partial <ESDefaultProfileLoginDetails>, Partial <ESDefaultProfileLoginDetails> >?partial = null, CancellationToken cancellationToken = default) { var queryParameters = new NameValueCollection(); queryParameters.Append("$fields", (partial != null ? partial(new Partial <ESDefaultProfileLoginDetails>()) : Partial <ESDefaultProfileLoginDetails> .Default()).ToString()); return(await _connection.RequestResourceAsync <AuthModulesTestLdapPostRequest, ESDefaultProfileLoginDetails>("POST", $"api/http/auth-modules/test/ldap{queryParameters.ToQueryString()}", new AuthModulesTestLdapPostRequest { Settings = settings, Username = username, Password = password, }, cancellationToken)); }
public AuthModulesTestLdapPostRequest(ESLdapAuthModuleSettings settings, string username, string password) { Settings = settings; Username = username; Password = password; }