src/AspNet.Security.OAuth.Keycloak/KeycloakAuthenticationExtensions.cs
/// <summary>
/// Adds <see cref="KeycloakAuthenticationHandler"/> to the specified
/// <see cref="AuthenticationBuilder"/>, which enables Keycloak authentication capabilities.
/// </summary>
/// <param name="builder">The authentication builder.</param>
/// <param name="scheme">The authentication scheme associated with this instance.</param>
/// <param name="caption">The optional display name associated with this instance.</param>
/// <param name="configuration">The delegate used to configure the Keycloak options.</param>
/// <returns>The <see cref="AuthenticationBuilder"/>.</returns>
Adds  to the specified
, which enables Keycloak authentication capabilities.
Adds to the specified which enables Keycloak authentication capabilities .
public static AuthenticationBuilder AddKeycloak(
        [NotNull] this AuthenticationBuilder builder,
        [NotNull] string scheme,
        [CanBeNull] string caption,
        [NotNull] Action<KeycloakAuthenticationOptions> configuration)
    {
        builder.Services.TryAddSingleton<IPostConfigureOptions<KeycloakAuthenticationOptions>, KeycloakPostConfigureOptions>();
        return builder.AddOAuth<KeycloakAuthenticationOptions, KeycloakAuthenticationHandler>(scheme, caption, configuration);
    }
public static AuthenticationBuilder AddKeycloak ( [ NotNull ] this AuthenticationBuilder builder , [ NotNull ] string scheme , [ CanBeNull ] string caption , [ NotNull ] Action < KeycloakAuthenticationOptions > configuration ) { builder . Services . TryAddSingleton < IPostConfigureOptions < KeycloakAuthenticationOptions > , KeycloakPostConfigureOptions > ( ) ; return builder . AddOAuth < KeycloakAuthenticationOptions , KeycloakAuthenticationHandler > ( scheme , caption , configuration ) ; }
Adds  to the specified
, which enables Keycloak authentication capabilities.
Adds to the specified which enables Keycloak authentication capabilities .
None
this
[NotNull]
string
[CanBeNull]
Action<KeycloakAuthenticationOptions>
[NotNull]
builder
The authentication builder.
The authentication builder .
scheme
The authentication scheme associated with this instance.
The authentication scheme associated with this instance .
caption
The optional display name associated with this instance.
The optional display name associated with this instance .
configuration
The delegate used to configure the Keycloak options.
The delegate used to configure the Keycloak options .