using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;

namespace BTCPayServer.Security;

public class AuthorizationFilterHandle
{
    public AuthorizationHandlerContext Context { get; }
    public PolicyRequirement Requirement { get; }
    public HttpContext HttpContext { get; }
    public bool Success { get; }

    public AuthorizationFilterHandle(
        AuthorizationHandlerContext context,
        PolicyRequirement requirement,
        HttpContext httpContext)
    {
        Context = context;
        Requirement = requirement;
        HttpContext = httpContext;
    }
}

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;

namespace BTCPayServer.Security;

public class AuthorizationFilterHandle
{
    public AuthorizationHandlerContext Context { get; }
    public PolicyRequirement Requirement { get; }
    public HttpContext HttpContext { get; }
    public bool Success { get; private set;  }

    public AuthorizationFilterHandle(
        AuthorizationHandlerContext context,
        PolicyRequirement requirement,
        HttpContext httpContext)
    {
        Context = context;
        Requirement = requirement;
        HttpContext = httpContext;
    }

    public void MarkSuccessful()
    {
        Success = true;
    }
}

Add ability to mark auth handle as successful
Add ability to mark auth handle as successful

Without this, there is no way to let the handle finish with a successful state. I somehow missed to add this in #3977.
