Dela via


AuthenticationHandler<TOptions>.HandleUnauthorizedAsync Method

Definition

Override this method to deal with 401 challenge concerns, if an authentication scheme in question deals an authentication interaction as part of it's request flow. (like adding a response header, or changing the 401 result to 302 of a login page or external sign-in location.)

protected:
 virtual System::Threading::Tasks::Task<bool> ^ HandleUnauthorizedAsync(Microsoft::AspNetCore::Http::Features::Authentication::ChallengeContext ^ context);
protected virtual System.Threading.Tasks.Task<bool> HandleUnauthorizedAsync (Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext context);
abstract member HandleUnauthorizedAsync : Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext -> System.Threading.Tasks.Task<bool>
override this.HandleUnauthorizedAsync : Microsoft.AspNetCore.Http.Features.Authentication.ChallengeContext -> System.Threading.Tasks.Task<bool>
Protected Overridable Function HandleUnauthorizedAsync (context As ChallengeContext) As Task(Of Boolean)

Parameters

Returns

The returned boolean is no longer used.

Applies to