string PolicyName { get; }
Source
Gets the non-empty host policy name to evaluate.
Provides passive auth results for RazorWire auth projection helpers.
Implementations adapt a host-owned auth system into AppSurfaceAuthResult. They must not sign users in, sign users out, mutate cookies, challenge, forbid, redirect, or create authorization policies. RazorWire uses the returned result only to choose server-rendered UI slots.
Task<AppSurfaceAuthResult> AuthorizeAsync(RazorWireAuthRequest request, CancellationToken cancellationToken = default)
Source
Evaluates or retrieves the auth result for a RazorWire auth projection request.
requestThe requested host-owned policy/resource pair.cancellationTokenToken observed before or during provider work.A passive AppSurface auth result for the requested projection.
Describes the host-owned auth decision RazorWire should project.
RazorWire treats this record as projection input only. The provider decides how to evaluate the policy; RazorWire only maps the resulting passive auth result into stable HTML states.
RazorWireAuthRequest Create(string policyName, object? resource = null)
Source
Creates a request after validating that the policy name is present.
policyNameThe non-empty host policy name.resourceOptional host-owned authorization resource.A validated RazorWire auth request.
ArgumentExceptionpolicyName is null, empty, or whitespace.string PolicyName { get; }
Source
Gets the non-empty host policy name to evaluate.
object? Resource { get; }
Source
Gets the optional host-owned authorization resource.
Safe RazorWire auth projection diagnostic metadata keys and codes.
Describes the safe UI projection for a passive AppSurface auth result.
RazorWireAuthProjection FromResult(AppSurfaceAuthResult result)
Source
Creates a projection from a passive AppSurface auth result.
resultThe auth result to project.A stable UI projection.
RazorWireAuthProjection Unknown()
Source
Creates the safe not-yet-evaluated projection.
An unknown-state projection without auth outcome details.
RazorWireAuthProjection StaticAnonymous()
Source
Creates the safe static-export anonymous projection without host auth outcome details.
An anonymous-state projection without auth outcome details.
RazorWireAuthProjectionState State { get; }
Source
Gets the stable RazorWire UI state token.
AppSurfaceAuthOutcome? Outcome { get; }
Source
Gets the optional AppSurface auth outcome that produced this state.
AppSurfaceAuthReason? Reason { get; }
Source
Gets the optional AppSurface auth reason that produced this state.
string StateToken { get; }
Source
Gets the lowercase HTML token for State.
Stable UI states emitted by RazorWire auth projection helpers.