Skip to content

Latest commit

 

History

History
3 lines (2 loc) · 1.21 KB

File metadata and controls

3 lines (2 loc) · 1.21 KB

The call to xref:Microsoft.Extensions.DependencyInjection.IdentityServiceCollectionExtensions.AddIdentity%2A configures the default scheme settings. 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.