RazorWireAuthProjectionState State { get; }
Source
Gets the stable RazorWire UI state token.
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)
Evaluates or retrieves the auth result for a RazorWire auth projection request.
request
cancellationToken
A passive AppSurface auth result for the requested projection.
Safe RazorWire auth projection diagnostic metadata keys and codes.
Describes the safe UI projection for a passive AppSurface auth result.
RazorWireAuthProjection FromResult(AppSurfaceAuthResult result)
Creates a projection from a passive AppSurface auth result.
result
A stable UI projection.
RazorWireAuthProjection Unknown()
Creates the safe not-yet-evaluated projection.
An unknown-state projection without auth outcome details.
RazorWireAuthProjection StaticAnonymous()
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
.
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)
Creates a request after validating that the policy name is present.
policyName
resource
A validated RazorWire auth request.
ArgumentException
policyName
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.
Stable UI states emitted by RazorWire auth projection helpers.