KestrunHostAuthExtensions.AddOpenIdConnectAuthentication method

Adds OpenID Connect authentication to the Kestrun host.

Use this for applications that require OpenID Connect authentication.

public static KestrunHost AddOpenIdConnectAuthentication(this KestrunHost host, string scheme, 
    string clientId, string clientSecret, string authority, 
    Action<OpenIdConnectOptions>? configure = null, 
    Action<AuthorizationOptions>? configureAuthz = null)
parameter description
host The Kestrun host instance.
scheme The authentication scheme name.
clientId The client ID for the OpenID Connect application.
clientSecret The client secret for the OpenID Connect application.
authority The authority URL for the OpenID Connect provider.
configure An optional action to configure the OpenID Connect options.
configureAuthz An optional action to configure the authorization options.

Return Value

The configured KestrunHost instance.

See Also