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
IServiceCollectionThe IServiceCollection to add the HttpClient to.
keycloakOptions
KeycloakAdminClientOptionsThe 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
IServiceCollectionThe IServiceCollection to add the HttpClient to.
configuration
IConfigurationThe IConfiguration instance to bind the Keycloak options from.
configureClient
Action<HttpClient>An optional action to configure the HttpClient.
keycloakClientSectionName
stringThe 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
IServiceCollectionThe IServiceCollection to add the HttpClient to.
configurationSection
IConfigurationSectionThe 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
IServiceCollectionThe 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
IServiceCollectionThe IServiceCollection to add the HttpClient to.
configuration
IConfigurationThe IConfiguration instance to bind the Keycloak options from.
configureClient
Action<HttpClient>An optional action to configure the HttpClient.
keycloakClientSectionName
stringThe name of the configuration section containing the Keycloak client options.
Returns
- IHttpClientBuilder
The IHttpClientBuilder for further configuration.