Class ServiceCollectionExtensions
- Namespace
- Keycloak.AuthServices.Authentication
- Assembly
- Keycloak.AuthServices.Authentication.dll
Configures Authentication via Keycloak
[Obsolete("This class will be removed")]
public static class ServiceCollectionExtensions
- Inheritance
-
ServiceCollectionExtensions
- Inherited Members
Methods
AddKeycloakAuthentication(IServiceCollection, KeycloakAuthenticationOptions, Action<JwtBearerOptions>?)
Adds keycloak authentication services.
[Obsolete("This method will be removed. Use AddKeycloakWebApiAuthentication. Furthermore, the way KeycloakAuthenticationOptions is changed and you need to specify KeycloakFormatBinder.Instance to correctly bind the instance. See for more details https://nikiforovall.github.io/keycloak-authorization-services-dotnet/migration.html#key-changes-in-2-0-0")]
public static AuthenticationBuilder AddKeycloakAuthentication(this IServiceCollection services, KeycloakAuthenticationOptions keycloakOptions, Action<JwtBearerOptions>? configureOptions = null)
Parameters
services
IServiceCollectionkeycloakOptions
KeycloakAuthenticationOptionsconfigureOptions
Action<JwtBearerOptions>
Returns
AddKeycloakAuthentication(IServiceCollection, IConfiguration, Action<JwtBearerOptions>?)
Adds keycloak authentication services from configuration located in specified default section.
[Obsolete("This method will be removed. Use AddKeycloakWebApiAuthentication")]
public static AuthenticationBuilder AddKeycloakAuthentication(this IServiceCollection services, IConfiguration configuration, Action<JwtBearerOptions>? configureOptions = null)
Parameters
services
IServiceCollectionSource service collection
configuration
IConfigurationConfiguration source
configureOptions
Action<JwtBearerOptions>Configure overrides
Returns
AddKeycloakAuthentication(IServiceCollection, IConfiguration, string, Action<JwtBearerOptions>?)
Adds keycloak authentication services from section
[Obsolete("This method will be removed. Use AddKeycloakWebApiAuthentication")]
public static AuthenticationBuilder AddKeycloakAuthentication(this IServiceCollection services, IConfiguration configuration, string keycloakClientSectionName, Action<JwtBearerOptions>? configureOptions = null)
Parameters
services
IServiceCollectionconfiguration
IConfigurationkeycloakClientSectionName
stringconfigureOptions
Action<JwtBearerOptions>