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.
This commit is contained in:
Dennis Reimann 2022-08-02 09:34:45 +02:00 committed by Andrew Camilleri
parent 1e378dd986
commit bbce4451aa

View File

@ -8,7 +8,7 @@ public class AuthorizationFilterHandle
public AuthorizationHandlerContext Context { get; }
public PolicyRequirement Requirement { get; }
public HttpContext HttpContext { get; }
public bool Success { get; }
public bool Success { get; private set; }
public AuthorizationFilterHandle(
AuthorizationHandlerContext context,
@ -19,4 +19,9 @@ public class AuthorizationFilterHandle
Requirement = requirement;
HttpContext = httpContext;
}
public void MarkSuccessful()
{
Success = true;
}
}