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)

來源:
OAuthAppBuilderExtensions.cs
來源:
OAuthAppBuilderExtensions.cs

警告

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

C#
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseOAuthAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
C#
[System.Obsolete("See https://go.microsoft.com/fwlink/?linkid=845470", true)]
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseOAuthAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
C#
[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);

參數

app
IApplicationBuilder

要加入處理程式的 IApplicationBuilder

傳回

作業完成後,這個實例的參考。

屬性

適用於

ASP.NET Core 2.2 及其他版本
產品 版本 (已淘汰)
ASP.NET Core 1.0, 1.1 (2.0, 2.1, 2.2)

UseOAuthAuthentication(IApplicationBuilder, OAuthOptions)

來源:
OAuthAppBuilderExtensions.cs
來源:
OAuthAppBuilderExtensions.cs

警告

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

C#
[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);
C#
[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);

參數

app
IApplicationBuilder

要加入處理程式的 IApplicationBuilder

options
OAuthOptions

指定處理程式選項的 OAuthOptions

傳回

作業完成後,這個實例的參考。

屬性

適用於

ASP.NET Core 2.2 及其他版本
產品 版本 (已淘汰)
ASP.NET Core (2.0, 2.1, 2.2)

UseOAuthAuthentication(IApplicationBuilder, OAuthOptions)

OAuthMiddleware<TOptions> 中間件新增至指定的 IApplicationBuilder,以啟用 OAuth 2.0 驗證功能。

C#
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseOAuthAuthentication (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.OAuthOptions options);

參數

app
IApplicationBuilder

要加入中間件的 IApplicationBuilder

options
OAuthOptions

指定中間件選項的 OAuthOptions

傳回

作業完成後,這個實例的參考。

適用於

ASP.NET Core 1.1 和 ASP.NET Core 1.0
產品 版本
ASP.NET Core 1.0, 1.1