Class StrataraSignInResult
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
succeededboolWhether the sign-in succeeded.
loginFailureMessagestringHuman-readable failure message (already localized for the consumer) or
nullon success.accessTokenInfoAccessTokenInfoIssued access-token information on success;
nullon failure.userIdGuid?Resolved user id when the user could be looked up, even on partial-success outcomes (lockout, two-factor required).
isLockedOutboolWhether the account is locked out due to repeated failures.
requiresTwoFactorboolWhether the account requires a second-factor step to complete sign-in.
isNotAllowedboolWhether 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
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
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
LoginFailureMessage
Human-readable failure message localized for display; null on success.
public string? LoginFailureMessage { get; init; }
Property Value
RequiresTwoFactor
Whether the account requires a second-factor step to complete sign-in.
public bool RequiresTwoFactor { get; init; }
Property Value
Succeeded
Whether the sign-in attempt succeeded.
public bool Succeeded { get; init; }
Property Value
UserId
Identifier of the user the sign-in attempt resolved to, when available.
public Guid? UserId { get; init; }
Property Value
- Guid?