ControllerBase.Forbid 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Forbid(AuthenticationProperties, String[]) |
ForbidResult根據預設,使用指定的驗證配置和 |
Forbid() |
預設會建立 ForbidResult (Status403Forbidden) 。 |
Forbid(AuthenticationProperties) |
ForbidResult根據預設,使用指定的 |
Forbid(AuthenticationProperties) |
使用指定的 |
Forbid(String[]) |
ForbidResult Status403Forbidden 根據預設,使用指定的驗證配置建立) (。 |
Forbid(AuthenticationProperties, String[]) |
ForbidResult使用指定的驗證配置和 |
Forbid(AuthenticationProperties, String[])
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()
預設會建立 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)
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[])
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 的 。
- 屬性