PolicyAuthorizationResult.Forbid 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Forbid() |
表示禁止存取資源。 |
Forbid(AuthorizationFailure) |
表示禁止存取資源。 |
Forbid()
表示禁止存取資源。
public:
static Microsoft::AspNetCore::Authorization::Policy::PolicyAuthorizationResult ^ Forbid();
public static Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult Forbid ();
static member Forbid : unit -> Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult
Public Shared Function Forbid () As PolicyAuthorizationResult
傳回
適用於
Forbid(AuthorizationFailure)
表示禁止存取資源。
public:
static Microsoft::AspNetCore::Authorization::Policy::PolicyAuthorizationResult ^ Forbid(Microsoft::AspNetCore::Authorization::AuthorizationFailure ^ authorizationFailure);
public static Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult Forbid (Microsoft.AspNetCore.Authorization.AuthorizationFailure? authorizationFailure);
static member Forbid : Microsoft.AspNetCore.Authorization.AuthorizationFailure -> Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult
Public Shared Function Forbid (authorizationFailure As AuthorizationFailure) As PolicyAuthorizationResult
參數
- authorizationFailure
- AuthorizationFailure
指定授權失敗的原因。