PageModel.Challenge 方法

定义

重载

Challenge()

创建一个 ChallengeResult

Challenge(AuthenticationProperties)

ChallengeResult使用指定的 properties创建 。

Challenge(String[])

ChallengeResult使用指定的身份验证方案创建 。

Challenge(AuthenticationProperties, String[])

ChallengeResult使用指定的身份验证方案和 properties创建 。

Challenge()

创建一个 ChallengeResult

public:
 virtual Microsoft::AspNetCore::Mvc::ChallengeResult ^ Challenge();
public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge ();
abstract member Challenge : unit -> Microsoft.AspNetCore.Mvc.ChallengeResult
override this.Challenge : unit -> Microsoft.AspNetCore.Mvc.ChallengeResult
Public Overridable Function Challenge () As ChallengeResult

返回

为响应创建的 ChallengeResult

注解

此方法的行为取决于 IAuthenticationService 正在使用的 。 Status401UnauthorizedStatus403Forbidden 是可能的状态结果之一。

适用于

Challenge(AuthenticationProperties)

ChallengeResult使用指定的 properties创建 。

public:
 virtual Microsoft::AspNetCore::Mvc::ChallengeResult ^ Challenge(Microsoft::AspNetCore::Authentication::AuthenticationProperties ^ properties);
public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge (Microsoft.AspNetCore.Authentication.AuthenticationProperties properties);
abstract member Challenge : Microsoft.AspNetCore.Authentication.AuthenticationProperties -> Microsoft.AspNetCore.Mvc.ChallengeResult
override this.Challenge : Microsoft.AspNetCore.Authentication.AuthenticationProperties -> Microsoft.AspNetCore.Mvc.ChallengeResult
Public Overridable Function Challenge (properties As AuthenticationProperties) As ChallengeResult

参数

properties
AuthenticationProperties

AuthenticationProperties 用于执行身份验证质询。

返回

为响应创建的 ChallengeResult

注解

此方法的行为取决于 IAuthenticationService 正在使用的 。 Status401UnauthorizedStatus403Forbidden 是可能的状态结果之一。

适用于

Challenge(String[])

ChallengeResult使用指定的身份验证方案创建 。

public:
 virtual Microsoft::AspNetCore::Mvc::ChallengeResult ^ Challenge(... cli::array <System::String ^> ^ authenticationSchemes);
public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge (params string[] authenticationSchemes);
abstract member Challenge : string[] -> Microsoft.AspNetCore.Mvc.ChallengeResult
override this.Challenge : string[] -> Microsoft.AspNetCore.Mvc.ChallengeResult
Public Overridable Function Challenge (ParamArray authenticationSchemes As String()) As ChallengeResult

参数

authenticationSchemes
String[]

要质询的身份验证方案。

返回

为响应创建的 ChallengeResult

注解

此方法的行为取决于 IAuthenticationService 正在使用的 。 Status401UnauthorizedStatus403Forbidden 是可能的状态结果之一。

适用于

Challenge(AuthenticationProperties, String[])

ChallengeResult使用指定的身份验证方案和 properties创建 。

public:
 virtual Microsoft::AspNetCore::Mvc::ChallengeResult ^ Challenge(Microsoft::AspNetCore::Authentication::AuthenticationProperties ^ properties, ... cli::array <System::String ^> ^ authenticationSchemes);
public virtual Microsoft.AspNetCore.Mvc.ChallengeResult Challenge (Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, params string[] authenticationSchemes);
abstract member Challenge : Microsoft.AspNetCore.Authentication.AuthenticationProperties * string[] -> Microsoft.AspNetCore.Mvc.ChallengeResult
override this.Challenge : Microsoft.AspNetCore.Authentication.AuthenticationProperties * string[] -> Microsoft.AspNetCore.Mvc.ChallengeResult
Public Overridable Function Challenge (properties As AuthenticationProperties, ParamArray authenticationSchemes As String()) As ChallengeResult

参数

properties
AuthenticationProperties

AuthenticationProperties 用于执行身份验证质询。

authenticationSchemes
String[]

要质询的身份验证方案。

返回

为响应创建的 ChallengeResult

注解

此方法的行为取决于 IAuthenticationService 正在使用的 。 Status401UnauthorizedStatus403Forbidden 是可能的状态结果之一。

适用于