Table of Contents

Class OidcExchangeResult

Namespace
SEBT.Portal.Core.Services
Assembly
SEBT.Portal.Core.dll

Result of the OIDC code exchange.

public sealed record OidcExchangeResult
Inheritance
object
OidcExchangeResult

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

OidcExchangeFailureReason?

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

reason OidcExchangeFailureReason
error string

Returns

OidcExchangeResult

Ok(string, string?)

Creates a successful result with the given callback token.

public static OidcExchangeResult Ok(string callbackToken, string? phoneClaim = null)

Parameters

callbackToken string
phoneClaim string

Returns

OidcExchangeResult