public Task HandleAuthNFailed(AccessDeniedContext context) { this.logger.LogError(EventIDs.ExternalAuthNAccessDenied, context.Result?.Failure, LogMessages.AuthNAccessDenied); context.HandleResponse(); context.Response.Redirect($"/Home/AuthNError?messageid={(int)AuthNFailureMessageID.ExternalAuthNProviderDenied}"); return(Task.CompletedTask); }
public static Task HandleAccessDenied(this AccessDeniedContext context) { Log.Error( "External authentication access denied. {Scheme}", context.Scheme.Name); context.Response.RedirectExternalError(context.Scheme.Name, context.Properties); context.HandleResponse(); return(Task.CompletedTask); }