AuthorizationHandlerContext.Fail Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Fail() |
Called to indicate HasSucceeded will never return true, even if all requirements are met. |
Fail(AuthorizationFailureReason) |
Called to indicate HasSucceeded will never return true, even if all requirements are met. |
Fail()
Called to indicate HasSucceeded will never return true, even if all requirements are met.
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 ()
Applies to
Fail(AuthorizationFailureReason)
Called to indicate HasSucceeded will never return true, even if all requirements are met.
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)
Parameters
- reason
- AuthorizationFailureReason
Optional AuthorizationFailureReason for why authorization failed.