Skip to content

Latest commit

 

History

History
4 lines (3 loc) · 1.12 KB

File metadata and controls

4 lines (3 loc) · 1.12 KB

The xref:Microsoft.Extensions.DependencyInjection.AuthenticationServiceCollectionExtensions.AddAuthentication(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.String) overload sets the xref:Microsoft.AspNetCore.Authentication.AuthenticationOptions.DefaultScheme%2A property. The xref:Microsoft.Extensions.DependencyInjection.AuthenticationServiceCollectionExtensions.AddAuthentication(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{Microsoft.AspNetCore.Authentication.AuthenticationOptions}) overload allows configuring authentication options, which can be used to set up default authentication schemes for different purposes. Subsequent calls to AddAuthentication override previously configured xref:Microsoft.AspNetCore.Builder.AuthenticationOptions properties.

xref:Microsoft.AspNetCore.Authentication.AuthenticationBuilder extension methods that register an authentication handler may only be called once per authentication scheme. Overloads exist that allow configuring the scheme properties, scheme name, and display name.