Table of Contents

Class ServiceCollectionExtensions

Namespace
Keycloak.AuthServices.Authorization
Assembly
Keycloak.AuthServices.Authorization.dll

Add Keycloak authorization services

public static class ServiceCollectionExtensions
Inheritance
ServiceCollectionExtensions
Inherited Members

Methods

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

Adds Keycloak IAuthorizationServerClient client and auto header propagation

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

Parameters

services IServiceCollection
configuration IConfiguration
configureClient Action<HttpClient>
configSectionName string

Returns

IHttpClientBuilder

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

Adds Keycloak IAuthorizationServerClient client and auto header propagation

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

Parameters

services IServiceCollection
configurationSection IConfigurationSection
configureClient Action<HttpClient>

Returns

IHttpClientBuilder

AddAuthorizationServer(IServiceCollection, Action<KeycloakAuthorizationServerOptions>, Action<HttpClient>?)

Adds Keycloak IAuthorizationServerClient client, ProtectedResourcePolicyProvider and auto header propagation

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

Parameters

services IServiceCollection
configureKeycloakOptions Action<KeycloakAuthorizationServerOptions>
configureClient Action<HttpClient>

Returns

IHttpClientBuilder

AddAuthorizationServerClient(IServiceCollection, Action<HttpClient>?)

Adds Keycloak IAuthorizationServerClient client

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

Parameters

services IServiceCollection
configureClient Action<HttpClient>

Returns

IHttpClientBuilder

AddKeycloakAuthorization(IServiceCollection, IConfiguration, string)

Adds keycloak authorization services

public static IServiceCollection AddKeycloakAuthorization(this IServiceCollection services, IConfiguration configuration, string configSectionName = "Keycloak")

Parameters

services IServiceCollection
configuration IConfiguration
configSectionName string

Returns

IServiceCollection

AddKeycloakAuthorization(IServiceCollection, IConfigurationSection)

Adds keycloak authorization services

public static IServiceCollection AddKeycloakAuthorization(this IServiceCollection services, IConfigurationSection configurationSection)

Parameters

services IServiceCollection
configurationSection IConfigurationSection

Returns

IServiceCollection

AddKeycloakAuthorization(IServiceCollection, Action<KeycloakAuthorizationOptions>?)

Adds keycloak authorization services

public static IServiceCollection AddKeycloakAuthorization(this IServiceCollection services, Action<KeycloakAuthorizationOptions>? configureKeycloakAuthorizationOptions = null)

Parameters

services IServiceCollection
configureKeycloakAuthorizationOptions Action<KeycloakAuthorizationOptions>

Returns

IServiceCollection