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>

用于配置方案选项。

返回

生成器。

适用于