AuthenticationHandler<TOptions>.HandleForbiddenAsync Method

Definition

Overloads

HandleForbiddenAsync(AuthenticationProperties)

Override this method to handle Forbid.

HandleForbiddenAsync(ChallengeContext)

Override this method to deal with a challenge that is forbidden.

HandleForbiddenAsync(AuthenticationProperties)

Source:
AuthenticationHandler.cs
Source:
AuthenticationHandler.cs
Source:
AuthenticationHandler.cs

Override this method to handle Forbid.

C#
protected virtual System.Threading.Tasks.Task HandleForbiddenAsync (Microsoft.AspNetCore.Authentication.AuthenticationProperties properties);

Parameters

Returns

A Task.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

HandleForbiddenAsync(ChallengeContext)

Override this method to deal with a challenge that is forbidden.

C#
protected virtual System.Threading.Tasks.Task<bool> HandleForbiddenAsync (Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext context);

Parameters

Returns

The returned boolean is ignored.

Applies to

ASP.NET Core 1.1 and ASP.NET Core 1.0
Product Versions
ASP.NET Core 1.0, 1.1