AuthenticationServiceCollectionExtensions Class¶
Extension methods for setting up authentication services in an Microsoft.Extensions.DependencyInjection.IServiceCollection.
- Namespace
Microsoft.Extensions.DependencyInjection- Assemblies
- Microsoft.AspNetCore.Authentication
Syntax¶
public class AuthenticationServiceCollectionExtensions
-
class
Microsoft.Extensions.DependencyInjection.AuthenticationServiceCollectionExtensions
Methods¶
-
AddAuthentication(Microsoft.Extensions.DependencyInjection.IServiceCollection)¶ Adds authentication services to the specified
Microsoft.Extensions.DependencyInjection.IServiceCollection.Arguments: services (Microsoft.Extensions.DependencyInjection.IServiceCollection) – The Microsoft.Extensions.DependencyInjection.IServiceCollectionto add services to.Return type: Microsoft.Extensions.DependencyInjection.IServiceCollection Returns: The Microsoft.Extensions.DependencyInjection.IServiceCollectionso that additional calls can be chained.public static IServiceCollection AddAuthentication(this IServiceCollection services)
-
AddAuthentication(Microsoft.Extensions.DependencyInjection.IServiceCollection, System.Action<Microsoft.AspNetCore.Authentication.SharedAuthenticationOptions>) Adds authentication services to the specified
Microsoft.Extensions.DependencyInjection.IServiceCollection.Arguments: - services (Microsoft.Extensions.DependencyInjection.IServiceCollection) – The
Microsoft.Extensions.DependencyInjection.IServiceCollectionto add services to. - configureOptions (System.Action<Microsoft.AspNetCore.Authentication.SharedAuthenticationOptions>) – An action delegate to configure the provided
Microsoft.AspNetCore.Authentication.SharedAuthenticationOptions.
Return type: Returns: The
Microsoft.Extensions.DependencyInjection.IServiceCollectionso that additional calls can be chained.public static IServiceCollection AddAuthentication(this IServiceCollection services, Action<SharedAuthenticationOptions> configureOptions)
- services (Microsoft.Extensions.DependencyInjection.IServiceCollection) – The
-