共用方式為


AuthenticationBuilder.AddPolicyScheme 方法

定義

PolicySchemeHandler新增可用來重新導向至其他驗證配置的型驗證處理常式。

public:
 virtual Microsoft::AspNetCore::Authentication::AuthenticationBuilder ^ AddPolicyScheme(System::String ^ authenticationScheme, System::String ^ displayName, Action<Microsoft::AspNetCore::Authentication::PolicySchemeOptions ^> ^ configureOptions);
public virtual Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddPolicyScheme (string authenticationScheme, string displayName, Action<Microsoft.AspNetCore.Authentication.PolicySchemeOptions> configureOptions);
public virtual Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddPolicyScheme (string authenticationScheme, string? displayName, Action<Microsoft.AspNetCore.Authentication.PolicySchemeOptions> configureOptions);
abstract member AddPolicyScheme : string * string * Action<Microsoft.AspNetCore.Authentication.PolicySchemeOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
override this.AddPolicyScheme : string * string * Action<Microsoft.AspNetCore.Authentication.PolicySchemeOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
Public Overridable Function AddPolicyScheme (authenticationScheme As String, displayName As String, configureOptions As Action(Of PolicySchemeOptions)) As AuthenticationBuilder

參數

authenticationScheme
String

此配置的名稱。

displayName
String

此配置的顯示名稱。

configureOptions
Action<PolicySchemeOptions>

用來設定配置選項。

傳回

產生器。

適用於