Class OidcExchangeResult
Result of the OIDC code exchange.
public sealed record OidcExchangeResult
- Inheritance
-
objectOidcExchangeResult
Properties
CallbackToken
Signed callback token (short-lived JWT containing IdP claims). Null on failure.
public string? CallbackToken { get; init; }
Property Value
- string
Error
Human-readable error message for the client. Null on success.
public string? Error { get; init; }
Property Value
- string
FailureReason
Why the exchange failed. Null on success.
public OidcExchangeFailureReason? FailureReason { get; init; }
Property Value
PhoneClaim
Phone claim value extracted during the exchange (for diagnostic logging). Null when absent or on failure.
public string? PhoneClaim { get; init; }
Property Value
- string
Success
True when exchange + verification succeeded.
public bool Success { get; init; }
Property Value
- bool
Methods
Fail(OidcExchangeFailureReason, string)
Creates a failed result with the given reason and error message.
public static OidcExchangeResult Fail(OidcExchangeFailureReason reason, string error)
Parameters
reasonOidcExchangeFailureReasonerrorstring
Returns
Ok(string, string?)
Creates a successful result with the given callback token.
public static OidcExchangeResult Ok(string callbackToken, string? phoneClaim = null)
Parameters
callbackTokenstringphoneClaimstring