共用方式為


ControllerBase.Forbid 方法

定義

多載

Forbid(AuthenticationProperties, String[])

ForbidResult根據預設,使用指定的驗證配置和 properties 建立 (Status403Forbidden) 。

Forbid()

預設會建立 ForbidResult (Status403Forbidden) 。

Forbid(AuthenticationProperties)

ForbidResult根據預設,使用指定的 properties 建立 (Status403Forbidden) 。

Forbid(AuthenticationProperties)

使用指定的 properties 建立 ForbidResult

Forbid(String[])

ForbidResult Status403Forbidden 根據預設,使用指定的驗證配置建立) (。

Forbid(AuthenticationProperties, String[])

ForbidResult使用指定的驗證配置和 properties 建立 。

Forbid(AuthenticationProperties, String[])

來源:
ControllerBase.cs
來源:
ControllerBase.cs
來源:
ControllerBase.cs

ForbidResult根據預設,使用指定的驗證配置和 properties 建立 (Status403Forbidden) 。

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

參數

properties
AuthenticationProperties

AuthenticationProperties 用來執行驗證挑戰。

authenticationSchemes
String[]

要挑戰的驗證配置。

傳回

為回應建立 ForbidResult 的 。

屬性

備註

某些驗證配置,例如 Cookie,會轉換成 Status403Forbidden 重新導向以顯示登入頁面。

適用於

Forbid()

來源:
ControllerBase.cs
來源:
ControllerBase.cs
來源:
ControllerBase.cs

預設會建立 ForbidResult (Status403Forbidden) 。

public:
 virtual Microsoft::AspNetCore::Mvc::ForbidResult ^ Forbid();
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid ();
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Forbid : unit -> Microsoft.AspNetCore.Mvc.ForbidResult
override this.Forbid : unit -> Microsoft.AspNetCore.Mvc.ForbidResult
Public Overridable Function Forbid () As ForbidResult

傳回

為回應建立 ForbidResult 的 。

屬性

備註

某些驗證配置,例如 Cookie,會轉換成 Status403Forbidden 重新導向以顯示登入頁面。

適用於

Forbid(AuthenticationProperties)

來源:
ControllerBase.cs
來源:
ControllerBase.cs
來源:
ControllerBase.cs

ForbidResult根據預設,使用指定的 properties 建立 (Status403Forbidden) 。

public:
 virtual Microsoft::AspNetCore::Mvc::ForbidResult ^ Forbid(Microsoft::AspNetCore::Authentication::AuthenticationProperties ^ properties);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid (Microsoft.AspNetCore.Authentication.AuthenticationProperties properties);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Forbid : Microsoft.AspNetCore.Authentication.AuthenticationProperties -> Microsoft.AspNetCore.Mvc.ForbidResult
override this.Forbid : Microsoft.AspNetCore.Authentication.AuthenticationProperties -> Microsoft.AspNetCore.Mvc.ForbidResult
Public Overridable Function Forbid (properties As AuthenticationProperties) As ForbidResult

參數

properties
AuthenticationProperties

AuthenticationProperties 用來執行驗證挑戰。

傳回

為回應建立 ForbidResult 的 。

屬性

備註

某些驗證配置,例如 Cookie,會轉換成 Status403Forbidden 重新導向以顯示登入頁面。

適用於

Forbid(AuthenticationProperties)

使用指定的 properties 建立 ForbidResult

public:
 virtual Microsoft::AspNetCore::Mvc::ForbidResult ^ Forbid(Microsoft::AspNetCore::Http::Authentication::AuthenticationProperties ^ properties);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid (Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties properties);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Forbid : Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties -> Microsoft.AspNetCore.Mvc.ForbidResult
override this.Forbid : Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties -> Microsoft.AspNetCore.Mvc.ForbidResult
Public Overridable Function Forbid (properties As AuthenticationProperties) As ForbidResult

參數

properties
AuthenticationProperties

AuthenticationProperties 用來執行驗證挑戰。

傳回

為回應建立 ForbidResult 的 。

屬性

適用於

Forbid(String[])

來源:
ControllerBase.cs
來源:
ControllerBase.cs
來源:
ControllerBase.cs

ForbidResult Status403Forbidden 根據預設,使用指定的驗證配置建立) (。

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

參數

authenticationSchemes
String[]

要挑戰的驗證配置。

傳回

為回應建立 ForbidResult 的 。

屬性

備註

某些驗證配置,例如 Cookie,會轉換成 Status403Forbidden 重新導向以顯示登入頁面。

適用於

Forbid(AuthenticationProperties, String[])

ForbidResult使用指定的驗證配置和 properties 建立 。

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

參數

properties
AuthenticationProperties

AuthenticationProperties 用來執行驗證挑戰。

authenticationSchemes
String[]

要挑戰的驗證配置。

傳回

為回應建立 ForbidResult 的 。

屬性

適用於