CookieAppBuilderExtensions Class¶
Extension methods to add cookie authentication capabilities to an HTTP application pipeline.
- Namespace
Microsoft.AspNetCore.Builder
- Assemblies
- Microsoft.AspNetCore.Authentication.Cookies
Syntax¶
public class CookieAppBuilderExtensions
-
class
Microsoft.AspNetCore.Builder.
CookieAppBuilderExtensions
Methods¶
-
UseCookieAuthentication
(Microsoft.AspNetCore.Builder.IApplicationBuilder)¶ Adds the
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware
middleware to the specifiedMicrosoft.AspNetCore.Builder.IApplicationBuilder
, which enables cookie authentication capabilities.Arguments: app (Microsoft.AspNetCore.Builder.IApplicationBuilder) – The Microsoft.AspNetCore.Builder.IApplicationBuilder
to add the middleware to.Return type: Microsoft.AspNetCore.Builder.IApplicationBuilder Returns: A reference to this instance after the operation has completed. public static IApplicationBuilder UseCookieAuthentication(this IApplicationBuilder app)
-
UseCookieAuthentication
(Microsoft.AspNetCore.Builder.IApplicationBuilder, Microsoft.AspNetCore.Builder.CookieAuthenticationOptions) Adds the
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware
middleware to the specifiedMicrosoft.AspNetCore.Builder.IApplicationBuilder
, which enables cookie authentication capabilities.Arguments: - app (Microsoft.AspNetCore.Builder.IApplicationBuilder) – The
Microsoft.AspNetCore.Builder.IApplicationBuilder
to add the middleware to. - options (Microsoft.AspNetCore.Builder.CookieAuthenticationOptions) – A
Microsoft.AspNetCore.Builder.CookieAuthenticationOptions
that specifies options for the middleware.
Return type: Returns: A reference to this instance after the operation has completed.
public static IApplicationBuilder UseCookieAuthentication(this IApplicationBuilder app, CookieAuthenticationOptions options)
- app (Microsoft.AspNetCore.Builder.IApplicationBuilder) – The
-