Skip to main content
Table of Contents

Class StrataraSignInResult

Namespace
Stratara.Identity.Core.Models
Assembly
Stratara.Identity.Core.dll

Channel-agnostic sign-in outcome carrying the user-friendly failure message, the issued AccessTokenInfo on success, and the resolved user identity. Returned by both IStrataraSignInManager and IStrataraAuthenticationStateProvider.

[ExcludeFromCodeCoverage]
public sealed class StrataraSignInResult
Inheritance
StrataraSignInResult
Inherited Members
Extension Methods

Remarks

Standalone type with no inheritance from Microsoft.AspNetCore.Identity.SignInResult, so hosts that cannot or will not depend on ASP.NET Core (mobile, desktop, console, unit tests against the abstraction surface) can consume this result type without pulling the MS Identity stack as a transitive dependency.

Constructors

StrataraSignInResult(bool, string?, AccessTokenInfo?, Guid?, bool, bool, bool)

Initializes a new instance carrying the outcome of a sign-in attempt.

public StrataraSignInResult(bool succeeded, string? loginFailureMessage, AccessTokenInfo? accessTokenInfo, Guid? userId = null, bool isLockedOut = false, bool requiresTwoFactor = false, bool isNotAllowed = false)

Parameters

succeeded bool

Whether the sign-in succeeded.

loginFailureMessage string

Human-readable failure message (already localized for the consumer) or null on success.

accessTokenInfo AccessTokenInfo

Issued access-token information on success; null on failure.

userId Guid?

Resolved user id when the user could be looked up, even on partial-success outcomes (lockout, two-factor required).

isLockedOut bool

Whether the account is locked out due to repeated failures.

requiresTwoFactor bool

Whether the account requires a second-factor step to complete sign-in.

isNotAllowed bool

Whether the account exists but is not currently allowed to sign in (e.g. email not confirmed). Surfaced so trusted-context UIs (admin panels, internal tools) can branch on it. Do not reflect this flag in UI text exposed to anonymous users — combined with the generic LoginFailureMessage the framework collapses "wrong password" and "not allowed" into one user-visible outcome to prevent username enumeration.

Properties

AccessTokenInfo

Issued access-token info on a successful sign-in; null on failure.

public AccessTokenInfo? AccessTokenInfo { get; init; }

Property Value

AccessTokenInfo

Remarks

Contains bearer credentials — see the security remarks on AccessTokenInfo and LoginResponse. Callers must persist this only in encrypted / platform-secure storage and must never log the value or surface it through telemetry.

IsLockedOut

Whether the account is locked out due to repeated failures.

public bool IsLockedOut { get; init; }

Property Value

bool

IsNotAllowed

Whether the account exists but is currently not allowed to sign in. Internal-only signal — must not be reflected in anonymous-user UI text or the framework's username-enumeration mitigation is undone.

public bool IsNotAllowed { get; init; }

Property Value

bool

LoginFailureMessage

Human-readable failure message localized for display; null on success.

public string? LoginFailureMessage { get; init; }

Property Value

string

RequiresTwoFactor

Whether the account requires a second-factor step to complete sign-in.

public bool RequiresTwoFactor { get; init; }

Property Value

bool

Succeeded

Whether the sign-in attempt succeeded.

public bool Succeeded { get; init; }

Property Value

bool

UserId

Identifier of the user the sign-in attempt resolved to, when available.

public Guid? UserId { get; init; }

Property Value

Guid?