AuthenticationHandler<TOptions>.HandleUnauthorizedAsync 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.
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
- context
- ChallengeContext
Returns
The returned boolean is no longer used.