Table of Contents

AddBasic Method

Definition

AddBasic(AuthenticationBuilder, Action<BasicAuthenticationOptions>)

Adds an BasicAuthenticationHandler to the authentication middleware.

public static AuthenticationBuilder AddBasic(this AuthenticationBuilder builder, Action<BasicAuthenticationOptions> setup)

Parameters

builder AuthenticationBuilder

The AuthenticationBuilder to extend.

setup Action<BasicAuthenticationOptions>

The BasicAuthenticationOptions which needs to be configured.

Returns

AuthenticationBuilder

A reference to builder so that additional calls can be chained.

Exceptions

ArgumentNullException

builder cannot be null.

ArgumentException

setup failed to configure an instance of BasicAuthenticationOptions in a valid state.