AuthorizationHandlerContext.Fail 方法

定义

重载

Fail()

调用以指示 HasSucceeded 永远不会返回 true,即使满足所有要求。

Fail(AuthorizationFailureReason)

调用以指示 HasSucceeded 永远不会返回 true,即使满足所有要求。

Fail()

Source:
AuthorizationHandlerContext.cs
Source:
AuthorizationHandlerContext.cs
Source:
AuthorizationHandlerContext.cs
Source:
AuthorizationHandlerContext.cs
Source:
AuthorizationHandlerContext.cs
Source:
AuthorizationHandlerContext.cs
Source:
AuthorizationHandlerContext.cs
Source:
AuthorizationHandlerContext.cs
Source:
AuthorizationHandlerContext.cs

调用以指示 HasSucceeded 永远不会返回 true,即使满足所有要求。

public:
 void Fail();
public:
 virtual void Fail();
public void Fail ();
public virtual void Fail ();
member this.Fail : unit -> unit
abstract member Fail : unit -> unit
override this.Fail : unit -> unit
Public Sub Fail ()
Public Overridable Sub Fail ()

适用于

Fail(AuthorizationFailureReason)

Source:
AuthorizationHandlerContext.cs
Source:
AuthorizationHandlerContext.cs
Source:
AuthorizationHandlerContext.cs
Source:
AuthorizationHandlerContext.cs

调用以指示 HasSucceeded 永远不会返回 true,即使满足所有要求。

public virtual void Fail (Microsoft.AspNetCore.Authorization.AuthorizationFailureReason reason);
abstract member Fail : Microsoft.AspNetCore.Authorization.AuthorizationFailureReason -> unit
override this.Fail : Microsoft.AspNetCore.Authorization.AuthorizationFailureReason -> unit
Public Overridable Sub Fail (reason As AuthorizationFailureReason)

参数

reason
AuthorizationFailureReason

授权失败原因的可选 AuthorizationFailureReason

适用于