Evaluates a named ASP.NET Core authorization policy and maps the outcome to an AppSurface result.
Parameters
-
policyName
The non-blank host policy name to evaluate.
-
resource
Optional resource passed to ASP.NET Core authorization handlers. When omitted, the current HttpContext
is used, matching common ASP.NET Core request-policy behavior.
-
cancellationToken
Cancellation observed before and during policy lookup.
Returns
AppSurfaceAuthOutcome.Allowed
for successful authorization, AppSurfaceAuthOutcome.Challenge
for unauthenticated policy outcomes, AppSurfaceAuthOutcome.Forbid
for authenticated denials, or a setup-failure result for missing host services, missing policies, or missing stable subject claims.