CookieAppBuilderExtensions.UseCookieAuthentication 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
UseCookieAuthentication(IApplicationBuilder) |
已过时.
已过时.
UseCookieAuthentication 已过时。 使用 AddAuthentication () 配置 Cookie 身份验证。在 ConfigureServices 中添加Cookie。 有关详细信息,请参阅 https://go.microsoft.com/fwlink/?linkid=845470 。 |
UseCookieAuthentication(IApplicationBuilder, CookieAuthenticationOptions) |
已过时.
已过时.
UseCookieAuthentication 已过时。 使用 AddAuthentication () 配置 Cookie 身份验证。在 ConfigureServices 中添加Cookie。 有关详细信息,请参阅 https://go.microsoft.com/fwlink/?linkid=845470 。 |
UseCookieAuthentication(IApplicationBuilder, CookieAuthenticationOptions) |
将 CookieAuthenticationMiddleware 中间件添加到指定的 IApplicationBuilder,这将启用 Cookie 身份验证功能。 |
UseCookieAuthentication(IApplicationBuilder)
注意
UseCookieAuthentication is obsolete. Configure Cookie authentication with AddAuthentication().AddCookie in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.
UseCookieAuthentication 已过时。 使用 AddAuthentication () 配置 Cookie 身份验证。在 ConfigureServices 中添加Cookie。 有关详细信息,请参阅 https://go.microsoft.com/fwlink/?linkid=845470 。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseCookieAuthentication(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCookieAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
[System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCookieAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
[System.Obsolete("UseCookieAuthentication is obsolete. Configure Cookie authentication with AddAuthentication().AddCookie in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCookieAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseCookieAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
[<System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)>]
static member UseCookieAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
[<System.Obsolete("UseCookieAuthentication is obsolete. Configure Cookie authentication with AddAuthentication().AddCookie in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)>]
static member UseCookieAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseCookieAuthentication (app As IApplicationBuilder) As IApplicationBuilder
参数
IApplicationBuilder要向其添加处理程序的 。
返回
完成操作后对此实例的引用。
- 属性
适用于
UseCookieAuthentication(IApplicationBuilder, CookieAuthenticationOptions)
注意
UseCookieAuthentication is obsolete. Configure Cookie authentication with AddAuthentication().AddCookie in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.
UseCookieAuthentication 已过时。 使用 AddAuthentication () 配置 Cookie 身份验证。在 ConfigureServices 中添加Cookie。 有关详细信息,请参阅 https://go.microsoft.com/fwlink/?linkid=845470 。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseCookieAuthentication(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Authentication::Cookies::CookieAuthenticationOptions ^ options);
[System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCookieAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions options);
[System.Obsolete("UseCookieAuthentication is obsolete. Configure Cookie authentication with AddAuthentication().AddCookie in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCookieAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions options);
[<System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)>]
static member UseCookieAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
[<System.Obsolete("UseCookieAuthentication is obsolete. Configure Cookie authentication with AddAuthentication().AddCookie in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)>]
static member UseCookieAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseCookieAuthentication (app As IApplicationBuilder, options As CookieAuthenticationOptions) As IApplicationBuilder
参数
IApplicationBuilder要向其添加处理程序的 。
- options
- CookieAuthenticationOptions
一个 CookieAuthenticationOptions ,它指定处理程序的选项。
返回
完成操作后对此实例的引用。
- 属性
适用于
UseCookieAuthentication(IApplicationBuilder, CookieAuthenticationOptions)
将 CookieAuthenticationMiddleware 中间件添加到指定的 IApplicationBuilder,这将启用 Cookie 身份验证功能。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseCookieAuthentication(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Builder::CookieAuthenticationOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseCookieAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.CookieAuthenticationOptions options);
static member UseCookieAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.CookieAuthenticationOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseCookieAuthentication (app As IApplicationBuilder, options As CookieAuthenticationOptions) As IApplicationBuilder
参数
要 IApplicationBuilder 向其添加中间件的 。
- options
- CookieAuthenticationOptions
一个 CookieAuthenticationOptions ,它指定中间件的选项。
返回
完成操作后对此实例的引用。