Table of Contents

Class ServiceCollectionExtensions

Namespace
Keycloak.AuthServices.Sdk.Kiota
Assembly
Keycloak.AuthServices.Sdk.Kiota.dll

Adds HTTP Client SDKs

public static class ServiceCollectionExtensions
Inheritance
ServiceCollectionExtensions
Inherited Members

Methods

AddKeycloakAdminHttpClient(IServiceCollection, KeycloakAdminClientOptions, Action<HttpClient>?)

Adds KeycloakAdminApiClient for Keycloak Admin API.

public static IHttpClientBuilder AddKeycloakAdminHttpClient(this IServiceCollection services, KeycloakAdminClientOptions keycloakOptions, Action<HttpClient>? configureClient = null)

Parameters

services IServiceCollection

The IServiceCollection to add the HttpClient to.

keycloakOptions KeycloakAdminClientOptions

The Keycloak client options.

configureClient Action<HttpClient>

An optional action to configure the HttpClient.

Returns

IHttpClientBuilder

The IHttpClientBuilder for further configuration.

AddKeycloakAdminHttpClient(IServiceCollection, IConfiguration, Action<HttpClient>?, string)

Adds KeycloakAdminApiClient for Keycloak Admin API.

public static IHttpClientBuilder AddKeycloakAdminHttpClient(this IServiceCollection services, IConfiguration configuration, Action<HttpClient>? configureClient = null, string keycloakClientSectionName = "Keycloak")

Parameters

services IServiceCollection

The IServiceCollection to add the HttpClient to.

configuration IConfiguration

The IConfiguration instance to bind the Keycloak options from.

configureClient Action<HttpClient>

An optional action to configure the HttpClient.

keycloakClientSectionName string

The name of the configuration section containing the Keycloak client options.

Returns

IHttpClientBuilder

The IHttpClientBuilder for further configuration.

AddKeycloakAdminHttpClient(IServiceCollection, IConfigurationSection, Action<HttpClient>?)

Adds KeycloakAdminApiClient for Keycloak Admin API.

public static IHttpClientBuilder AddKeycloakAdminHttpClient(this IServiceCollection services, IConfigurationSection configurationSection, Action<HttpClient>? configureClient = null)

Parameters

services IServiceCollection

The IServiceCollection to add the HttpClient to.

configurationSection IConfigurationSection

The IConfigurationSection to bind the Keycloak options from.

configureClient Action<HttpClient>

An optional action to configure the HttpClient.

Returns

IHttpClientBuilder

The IHttpClientBuilder for further configuration.

AddKeycloakAdminHttpClient(IServiceCollection, Action<KeycloakAdminClientOptions>, Action<HttpClient>?)

Adds KeycloakAdminApiClient for Keycloak Admin API.

public static IHttpClientBuilder AddKeycloakAdminHttpClient(this IServiceCollection services, Action<KeycloakAdminClientOptions> configureKeycloakOptions, Action<HttpClient>? configureClient = null)

Parameters

services IServiceCollection

The IServiceCollection to add the HttpClient to.

configureKeycloakOptions Action<KeycloakAdminClientOptions>

An action to configure the Keycloak client options.

configureClient Action<HttpClient>

An optional action to configure the HttpClient.

Returns

IHttpClientBuilder

The IHttpClientBuilder for further configuration.

AddKiotaKeycloakAdminHttpClient(IServiceCollection, IConfiguration, Action<HttpClient>?, string)

Adds KeycloakAdminApiClient for Keycloak Admin API alias for AddKeycloakAdminHttpClient(IServiceCollection, IConfiguration, Action<HttpClient>?, string). You can use it to resolve possible namespaces issues.

public static IHttpClientBuilder AddKiotaKeycloakAdminHttpClient(this IServiceCollection services, IConfiguration configuration, Action<HttpClient>? configureClient = null, string keycloakClientSectionName = "Keycloak")

Parameters

services IServiceCollection

The IServiceCollection to add the HttpClient to.

configuration IConfiguration

The IConfiguration instance to bind the Keycloak options from.

configureClient Action<HttpClient>

An optional action to configure the HttpClient.

keycloakClientSectionName string

The name of the configuration section containing the Keycloak client options.

Returns

IHttpClientBuilder

The IHttpClientBuilder for further configuration.