Skip to main content
Table of Contents

Interface IStrataraSignInManager

Namespace
Stratara.Identity.Core.Abstractions
Assembly
Stratara.Identity.Core.dll

Channel-agnostic sign-in manager surface. Implementations wrap the host's native identity machinery (e.g. ASP.NET Core SignInManager<TUser> for server-side Blazor; HTTP calls to the identity endpoint for non-web hosts) and produce the unified StrataraSignInResult.

public interface IStrataraSignInManager
Extension Methods

Methods

PasswordSignInAsync(string, string, bool, bool, CancellationToken)

Performs a password sign-in.

Task<StrataraSignInResult> PasswordSignInAsync(string email, string password, bool isPersistent, bool lockoutOnFailure, CancellationToken cancellationToken = default)

Parameters

email string

User email.

password string

User password.

isPersistent bool

Whether the resulting session should persist.

lockoutOnFailure bool

Whether repeated failures should advance the lockout counter.

cancellationToken CancellationToken

Propagated to the underlying identity stack and any HTTP / DB calls.

Returns

Task<StrataraSignInResult>

RefreshSignInAsync(AccessTokenInfo, CancellationToken)

Refreshes the current sign-in using the given AccessTokenInfo's refresh token.

Task<bool> RefreshSignInAsync(AccessTokenInfo tokenInfo, CancellationToken cancellationToken = default)

Parameters

tokenInfo AccessTokenInfo

The current access-token info.

cancellationToken CancellationToken

Propagated to the refresh HTTP call and any subsequent token-persist.

Returns

Task<bool>

true when the refresh succeeded and a new token was persisted; false otherwise.

SignOutAsync(CancellationToken)

Signs the current user out and clears any persisted token state.

Task SignOutAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Propagated to the underlying identity stack and any HTTP / DB calls.

Returns

Task

TwoFactorAuthenticatorSignInAsync(string, bool, bool, CancellationToken)

Completes a two-factor sign-in step using a TOTP code.

Task<StrataraSignInResult> TwoFactorAuthenticatorSignInAsync(string code, bool isPersistent, bool rememberClient, CancellationToken cancellationToken = default)

Parameters

code string

TOTP authenticator code.

isPersistent bool

Whether the resulting session should persist.

rememberClient bool

Whether to remember this client to skip future two-factor prompts.

cancellationToken CancellationToken

Propagated to the underlying identity stack and any HTTP / DB calls.

Returns

Task<StrataraSignInResult>

TwoFactorRecoveryCodeSignInAsync(string, CancellationToken)

Completes a two-factor sign-in step using a recovery code.

Task<StrataraSignInResult> TwoFactorRecoveryCodeSignInAsync(string recoveryCode, CancellationToken cancellationToken = default)

Parameters

recoveryCode string

Recovery code from the user's printed list.

cancellationToken CancellationToken

Propagated to the underlying identity stack and any HTTP / DB calls.

Returns

Task<StrataraSignInResult>