OAuthAppBuilderExtensions.UseOAuthAuthentication 方法

定义

重载

UseOAuthAuthentication(IApplicationBuilder)
已过时。
已过时。

UseOAuthAuthentication 已过时。 配置 AddAuthentication () 的 OAuth 身份验证。ConfigureServices 中的 AddOAuth。 有关详细信息,请参阅 https://go.microsoft.com/fwlink/?linkid=845470

UseOAuthAuthentication(IApplicationBuilder, OAuthOptions)
已过时。
已过时。

UseOAuthAuthentication 已过时。 配置 AddAuthentication () 的 OAuth 身份验证。ConfigureServices 中的 AddOAuth。 有关详细信息,请参阅 https://go.microsoft.com/fwlink/?linkid=845470

UseOAuthAuthentication(IApplicationBuilder, OAuthOptions)

OAuthMiddleware<TOptions> 中间件添加到指定的 IApplicationBuilder 中,这将启用 OAuth 2.0 身份验证功能。

UseOAuthAuthentication(IApplicationBuilder)

注意

UseOAuthAuthentication is obsolete. Configure OAuth authentication with AddAuthentication().AddOAuth in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.

UseOAuthAuthentication 已过时。 配置 AddAuthentication () 的 OAuth 身份验证。ConfigureServices 中的 AddOAuth。 有关详细信息,请参阅 https://go.microsoft.com/fwlink/?linkid=845470

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseOAuthAuthentication(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseOAuthAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
[System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseOAuthAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
[System.Obsolete("UseOAuthAuthentication is obsolete. Configure OAuth authentication with AddAuthentication().AddOAuth in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseOAuthAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseOAuthAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
[<System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)>]
static member UseOAuthAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
[<System.Obsolete("UseOAuthAuthentication is obsolete. Configure OAuth authentication with AddAuthentication().AddOAuth in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)>]
static member UseOAuthAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseOAuthAuthentication (app As IApplicationBuilder) As IApplicationBuilder

参数

app
IApplicationBuilder

要向其 IApplicationBuilder 添加处理程序的。

返回

IApplicationBuilder

完成操作后对此实例的引用。

属性

适用于

UseOAuthAuthentication(IApplicationBuilder, OAuthOptions)

注意

UseOAuthAuthentication is obsolete. Configure OAuth authentication with AddAuthentication().AddOAuth in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.

UseOAuthAuthentication 已过时。 配置 AddAuthentication () 的 OAuth 身份验证。ConfigureServices 中的 AddOAuth。 有关详细信息,请参阅 https://go.microsoft.com/fwlink/?linkid=845470

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseOAuthAuthentication(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Authentication::OAuth::OAuthOptions ^ options);
[System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseOAuthAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions options);
[System.Obsolete("UseOAuthAuthentication is obsolete. Configure OAuth authentication with AddAuthentication().AddOAuth in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseOAuthAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions options);
[<System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)>]
static member UseOAuthAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
[<System.Obsolete("UseOAuthAuthentication is obsolete. Configure OAuth authentication with AddAuthentication().AddOAuth in ConfigureServices. See https://go.microsoft.com/fwlink/?linkid=845470 for more details.", true)>]
static member UseOAuthAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Authentication.OAuth.OAuthOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseOAuthAuthentication (app As IApplicationBuilder, options As OAuthOptions) As IApplicationBuilder

参数

app
IApplicationBuilder

要向其 IApplicationBuilder 添加处理程序的。

options
OAuthOptions

一个 OAuthOptions ,它指定处理程序的选项。

返回

IApplicationBuilder

完成操作后对此实例的引用。

属性

适用于

UseOAuthAuthentication(IApplicationBuilder, OAuthOptions)

OAuthMiddleware<TOptions> 中间件添加到指定的 IApplicationBuilder 中,这将启用 OAuth 2.0 身份验证功能。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseOAuthAuthentication(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Builder::OAuthOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseOAuthAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.OAuthOptions options);
static member UseOAuthAuthentication : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.OAuthOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseOAuthAuthentication (app As IApplicationBuilder, options As OAuthOptions) As IApplicationBuilder

参数

app
IApplicationBuilder

IApplicationBuilder 将中间件添加到其中的。

options
OAuthOptions

一个 OAuthOptions ,它指定中间件的选项。

返回

IApplicationBuilder

完成操作后对此实例的引用。

适用于