Class ConsentInFlightState
In-flight state carried across the BFF-native consent round-trip.
The host emits consent_required as a JSON 400 (instead of the legacy 302 to
its own HTML page) when the BFF sets X-Identity-Delegate-Consent: 1 on
/connect/authorize. At that point the BFF still owns the original OIDC
authorize parameters (verifier/state/nonce) and the host session cookie jar that
authenticated the user a moment earlier. We need all of that to:
render a BFF-native /consent page asking the end-user to allow/deny,
POST the grant decision to the host's existing form-based
/consent endpoint with that same session cookie attached,
replay /connect/authorize once consent has been recorded so the
OIDC code is finally issued and the rest of the token exchange can complete.
Everything lives in a short-lived, DataProtection-signed cookie keyed to a single
OIDC exchange, exactly mirroring .
public sealed record ConsentInFlightState : IEquatable<ConsentInFlightState>
Inheritance
Implements
Properties
AppName
public string AppName { get; init; }
AuthorizeUrl
public string AuthorizeUrl { get; init; }
ClientId
public string ClientId { get; init; }
HostSessionCookieHeader
public string HostSessionCookieHeader { get; init; }
IssuedAt
public DateTimeOffset IssuedAt { get; init; }
Nonce
public string Nonce { get; init; }
ReturnUrl
public string? ReturnUrl { get; init; }
Scopes
public string[] Scopes { get; init; }
State
public string State { get; init; }
UserId
public long UserId { get; init; }
Verifier
public string Verifier { get; init; }
Constructors
ConsentInFlightState(string, string, string, string, string, string, string, string[], long, string?, DateTimeOffset)
In-flight state carried across the BFF-native consent round-trip.