public AuthModulesPostRequest(string key, string name, bool enabled, ESAuthModuleSettings settings) { Key = key; Name = name; IsEnabled = enabled; Settings = settings; }
public ESAuthModule(string id, string key, string name, int ordinal, bool enabled, ESAuthModuleSettings settings, string?iconDataURI = null) { Id = id; Key = key; Name = name; Ordinal = ordinal; IsEnabled = enabled; IconDataURI = iconDataURI; Settings = settings; }
public async Task <ESAuthModule> CreateAuthModuleAsync(string key, string name, bool enabled, ESAuthModuleSettings settings, Func <Partial <ESAuthModule>, Partial <ESAuthModule> >?partial = null, CancellationToken cancellationToken = default) { var queryParameters = new NameValueCollection(); queryParameters.Append("$fields", (partial != null ? partial(new Partial <ESAuthModule>()) : Partial <ESAuthModule> .Default()).ToString()); return(await _connection.RequestResourceAsync <AuthModulesPostRequest, ESAuthModule>("POST", $"api/http/auth-modules{queryParameters.ToQueryString()}", new AuthModulesPostRequest { Key = key, Name = name, IsEnabled = enabled, Settings = settings, }, cancellationToken)); }