Solhigson.Framework.Core
10.33.0
dotnet add package Solhigson.Framework.Core --version 10.33.0
NuGet\Install-Package Solhigson.Framework.Core -Version 10.33.0
<PackageReference Include="Solhigson.Framework.Core" Version="10.33.0" />
<PackageVersion Include="Solhigson.Framework.Core" Version="10.33.0" />
<PackageReference Include="Solhigson.Framework.Core" />
paket add Solhigson.Framework.Core --version 10.33.0
#r "nuget: Solhigson.Framework.Core, 10.33.0"
#:package Solhigson.Framework.Core@10.33.0
#addin nuget:?package=Solhigson.Framework.Core&version=10.33.0
#tool nuget:?package=Solhigson.Framework.Core&version=10.33.0
Utility Library
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Autofac.Extensions.DependencyInjection (>= 10.0.0)
- Hangfire.AspNetCore (>= 1.8.22)
- Hangfire.Console (>= 1.4.3)
- Hangfire.Core (>= 1.8.22)
- Hangfire.InMemory (>= 1.0.0)
- Hangfire.PostgreSql (>= 1.20.13)
- Hangfire.SqlServer (>= 1.8.22)
- Mapster (>= 7.4.0)
- Microsoft.AspNetCore.Identity.EntityFrameworkCore (>= 10.0.14)
- Microsoft.Data.SqlClient (>= 6.1.7)
- Microsoft.EntityFrameworkCore (>= 10.0.14)
- Microsoft.EntityFrameworkCore.Sqlite (>= 10.0.14)
- Microsoft.EntityFrameworkCore.SqlServer (>= 10.0.14)
- Microsoft.Extensions.Compliance.Redaction (>= 10.1.0)
- Microsoft.Extensions.Http.Polly (>= 10.0.14)
- Microsoft.Extensions.Identity.Stores (>= 10.0.14)
- Microsoft.Extensions.Telemetry (>= 10.1.0)
- Microsoft.Extensions.Telemetry.Abstractions (>= 10.1.0)
- Microsoft.IO.RecyclableMemoryStream (>= 3.0.1)
- NewId (>= 4.0.1)
- Newtonsoft.Json (>= 13.0.4)
- NLog (>= 6.0.7)
- NLog.Extensions.Logging (>= 6.1.0)
- Npgsql (>= 10.0.3)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.20.1)
- OpenTelemetry.Extensions.Hosting (>= 1.20.1)
- Solhigson.Utilities (>= 10.2.0)
- StackExchange.Redis (>= 2.10.1)
- Swashbuckle.AspNetCore.Annotations (>= 10.3.1)
- Swashbuckle.AspNetCore.SwaggerGen (>= 10.3.1)
- Swashbuckle.AspNetCore.SwaggerUI (>= 10.3.1)
- System.Runtime.Caching (>= 10.0.14)
- System.Security.Cryptography.Pkcs (>= 10.0.14)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Solhigson.Framework.Core:
| Package | Downloads |
|---|---|
|
Solhigson.Admin
Admin screens for Solhigson apps as Razor components, rendered on the server. An app owns its routes; the package ships no page. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.33.0 | 152 | 11/29/2026 |
| 10.32.0 | 117 | 11/27/2026 |
| 10.31.0 | 121 | 11/22/2026 |
| 10.30.0 | 111 | 11/20/2026 |
| 10.29.0 | 125 | 11/19/2026 |
| 10.28.0 | 96 | 11/18/2026 |
| 10.27.0 | 130 | 11/17/2026 |
| 10.26.0 | 102 | 11/16/2026 |
| 10.25.0 | 99 | 11/16/2026 |
| 10.24.0 | 105 | 11/16/2026 |
| 10.23.0 | 98 | 11/15/2026 |
| 10.22.0 | 103 | 11/15/2026 |
| 10.21.0 | 101 | 11/14/2026 |
| 10.20.0 | 115 | 11/14/2026 |
| 10.19.0 | 103 | 11/12/2026 |
| 10.18.0 | 535 | 11/12/2026 |
| 10.17.0 | 99 | 11/11/2026 |
| 10.16.0 | 186 | 11/11/2026 |
| 10.15.0 | 216 | 11/7/2026 |
| 10.14.0 | 105 | 11/5/2026 |
10.33.0: the host foundations: service-collection registration, a start-up lock, migration at start, sessions, security headers, an endpoint throttle, health endpoints, an identity seed and first-administrator creation (Solhigson.Framework.Extensions, Solhigson.Framework.Data, Solhigson.Framework.Identity, Solhigson.Framework.Identity.Sessions, Solhigson.Framework.Web, Solhigson.Framework.Web.Security, Solhigson.Framework.Web.Health, Solhigson.Framework.Throttling). RELEASING.md carries each consumer's adoption steps. Service-collection registration. services.AddSolhigsonFramework(configuration, configureDbContext) is for a host with no Autofac container. It registers what the Autofac module registers, with the same types and lifetimes, and adds AddHttpClient. A second call with another delegate throws. services.AddSolhigsonIndicatedDependencies(assembly) registers the [DependencyInject] classes. Nothing is property-injected. So it refuses the whole assembly, registering nothing, when one of those classes has a public settable reference-type property other than a string, is an open generic class, or is not assignable to a type it is registered as. Start-up lock. SolhigsonStartupLock.AcquireAsync(context, name, wait, ct) lets one host at a time do a start-up step. On PostgreSQL it holds a session advisory lock on its own connection. It answers the lease to dispose, or null when the wait ran out. On another provider the lease holds nothing, with one Warning a process. Migration at start. host.ApplyOrRefuseMigrationsAsync<TContext>(ct) throws PendingMigrationException while a migration is pending, unless Solhigson:Database:MigrateAtStart parses as true. With it true it applies them under the lock, and throws TimeoutException when the lock is not got in 2 minutes. SolhigsonMigrationStartup.ApplyMigrationsAsync<TContext>(services, ct) applies them whatever the switch says, for a migrate verb. MigrateStartupReport.Line(configuration) is the startup report's line. A context with no migrations is refused. A missing PostgreSQL database is never created. A failure writes the Error "The migrations of {Context} did not run: {Reason}" under Solhigson.Framework.Data.SolhigsonMigrationStartup. Sessions. identity.AddSolhigsonSessions(configure) makes Identity's application cookie a session the host can end. The cookie is HttpOnly, SameSite strict, Secure unless SecurePolicy says otherwise, and sliding, with MaxAge equal to IdleTimeout (30 minutes). These replace the app's own values. A principal is rejected and signed out when it is older than AbsoluteTimeout (12 hours), when it signed in before its user's watermark, or, with CheckEnabled (on), when its user is disabled or missing. Enabled is normally read at most once a minute a user a process. With OneSessionPerUser (on) a new sign-in ends the earlier sessions. ISessionRevocation.RevokeAsync(userId) ends them all and answers whether the watermark was written. Signing out writes no watermark, so call RevokeAsync to end a copied cookie. By default the watermark is kept in Redis through the app's IConnectionMultiplexer, with none of which the host does not start; a host may register its own ISessionWatermarkStore. That Redis must run with maxmemory-policy noeviction. services.UseInMemorySessionStore() is for one host. An unreadable watermark or Enabled rejects the principal unless FailOpen is set. Every user signs in again once, as an older cookie has no sign-in claim. The counter "session" (tag outcome) is on meter Solhigson.Framework.Identity, and lines are under Solhigson.Framework.Identity.Session. Security headers. app.UseSolhigsonSecurityHeaders(configure), called first in the pipeline, writes one Content-Security-Policy (default-src 'self', script-src a per-request nonce with 'strict-dynamic', object-src 'none', frame-ancestors 'none'), X-Frame-Options, nosniff and Referrer-Policy. It removes X-Xss-Protection and a Server header the app set; Kestrel's own needs AddServerHeader false. It replaces an endpoint's own policy, keeping only that policy's frame-ancestors, and keeps an endpoint's own Referrer-Policy. A script tag needs nonce = SolhigsonCsp.Nonce(context), which marks the response no-store. Inline style attributes are blocked. options.ForPath(prefix, configure) gives a path its own policy, the only place an unsafe script source is accepted. options.ReportTo(address) asks browsers to report violations; the framework receives none. ResponseCacheBlock.KeepUncached(context, cacheControl) is new. Endpoint throttle. app.UseSolhigsonEndpointThrottling(), placed after UseRouting, UseAuthentication and UseAntiforgery, enforces [Throttle(category, ThrottleBy.Address or ThrottleBy.User)] on a Razor component page or a minimal endpoint, and RequireThrottle on an endpoint or group, through the app's IThrottleLimits and IThrottleService. GET, HEAD and OPTIONS are not counted unless ThrottleMethods.All is set. Over the limit it answers 429 with Retry-After. A check that throws follows ThrottleOptions.FailOpen (true by default; false answers 503). Once its IConnectionMultiplexer is built, the Redis service does not throw on an outage: with FailOpen it allows the request, otherwise the answer is 429. A multiplexer that cannot be built (by default, one first connecting while Redis is down) is a check that throws. With no IThrottleService registered it allows every request, with one Warning a process. This throttle keys an IPv6 caller by its /64. It is apart from the global limit. An interactive component's events are not throttled. AddSolhigsonInMemoryThrottling() is a single host's service. A refusal writes a Warning under Solhigson.Framework.Throttling.EndpointThrottleMiddleware. Health endpoints. services.AddSolhigsonHealth(o => o.CheckDbContext<TContext>()) and endpoints.MapSolhigsonHealth() map anonymous /alive, which checks nothing, and /health. /health answers 503 unless every named context connects and Redis, when an IConnectionMultiplexer is registered, answers a ping. Each check has 3 seconds and a result stands for 5. A loopback caller also gets each check's outcome, so behind a proxy apply forwarded headers first. A failing check writes a Warning naming it, at most once a minute, under Solhigson.Framework.Web.Health. Identity seed. IdentitySeed<TUser, TRole, TContext, TKey>, registered scoped by AddSolhigsonIdentityManager, has RunAsync(plan, ct) for a host's start. Under the start-up lock it creates the plan's missing role groups and roles, then discovers its permissions, granting AllowedRoles only to a permission it inserts, so a withdrawn grant stays withdrawn. A role stored in another group is left there and gets no grant on that run. A failure writes one Error under Solhigson.Framework.Identity.IdentitySeed and throws. A permission it cannot save, a role Identity refuses or a role naming an unknown group throws IdentitySeedException, and what was saved stays. PermissionManager.DiscoverAsync is the same discovery, with PermissionDiscoveryMode.GrantEveryRun or GrantOnInsertOnly. First administrator. UserAdministration.CreateFirstAdministratorAsync(user, password, roleNames, ct) creates an enabled user with lockout on and those roles, only while the store holds no user, query filters ignored. AnyUserExistsAsync says whether it holds one. Neither needs rules or an acting user, so the first caller becomes the administrator: open the first-run page as soon as the app is deployed, and rate limit its POST. The new outcomes are PasswordRefused (reasons in PasswordErrors) and UsersExist. Success writes one Warning naming the new user's id. Changed for an existing caller. User administration's read-back after a commit that threw now ignores query filters (create, enable or disable, unlock, role change, email change), so a write that landed on a filtered user reads as landed. SolhigsonIdentityManager.CreateRoleAsync's missing-group message names the group, not the role. DiscoverNewPermissionsAsync still grants on every run, but now discards a failed permission save's pending writes, so they neither fail later saves nor stay in the context. A two-factor, API-log export or verb-failure line whose logger throws no longer leaves its tags on the thread for the next line. Minor bump: every new member is additive and existing behaviour changes only as above. A switch over UserAdministrationOutcome with no default arm meets two new values. A consumer's own type with one of these names, brought into a file by a using directive alongside the new type's namespace, is ambiguous there (CS0104) until it is renamed or the use qualified: ServiceCollectionRegistration, SolhigsonStartupLock, SolhigsonMigrationStartup, MigrateStartupReport, PendingMigrationException, IdentitySeedPlan, IdentitySeedRole, IdentitySeedResult, IdentitySeedException, PermissionDiscoveryMode, PermissionDiscoveryResult, ISessionRevocation, ISessionWatermarkStore, RedisSessionWatermarkStore, InMemorySessionWatermarkStore, SessionDiagnostics, SessionIdentityBuilderExtensions, SolhigsonSessionOptions, SolhigsonCsp, SolhigsonCspBuilder, SolhigsonSecurityHeaderOptions, ResponseCacheBlock, SolhigsonHealthOptions, ThrottleAttribute, ThrottleBy, ThrottleMethods or InMemorySlidingWindowThrottleService. 10.32.0: an awaitable cache resync, and the jobs dashboard behind the framework's permissions (Solhigson.Framework.EfCore, Solhigson.Framework.Web.Hangfire). The new ResyncCacheAndWaitAsync<T>(dbContext, timeout, ct) invalidates every cached table of the context (its DbSet<> properties whose entity is an ICachedEntity, each entity once) on every instance and waits up to timeout for EfCoreCacheManager.InvalidateAndWaitAsync, answering the new CacheResyncResult (TypeCount, ProviderPresent, Confirmed): Confirmed true when every type's change-tracker counter moved, so every instance drops those tables at its next check; false when a counter did not move (Redis failed), the provider failed, the wait timed out or the timeout is one Task.WaitAsync does not take, the invalidation still made; null when no invalidation was made, with no cache provider installed or no cached table (a null context has none). It throws only OperationCanceledException for ct, checked before the invalidation and honoured on the wait; an invalidation abandoned by the token or the timeout may still land. Each answer writes one Information line under Solhigson.Framework.EfCore.Extensions, Cache resync of {Context}: {TypeCount} cached types, confirmed {Confirmed}; a cancelled call writes none. ResyncCache is unchanged: it returns at once and answers nothing. The new MapSolhigsonHangfireDashboard(path, configure) maps Hangfire's dashboard through Hangfire's own endpoint mapping, its Authorization list empty (so not Hangfire's local-requests-only filter) and SolhigsonDashboardFilter its only async authorization, and requires the framework's permission policy for SolhigsonDashboardOptions.ViewPermission on the endpoint, under AuthenticationScheme when set (null, the app's default scheme): an anonymous request is challenged, and a signed-in user without the permission is refused and logged as on any permission page. ManagePermission, decided on each request but the polls and assets below, through IAuthorizationService and the permission policy, lets a user requeue, delete and trigger jobs; a user without it, or every user when it is null, sees the dashboard read-only, and the filter refuses that user's every POST but the two read-only polls below, so a command posted by hand changes nothing. AlsoRequire (Func<HttpContext, ValueTask<bool>>), the app's own rule, is asked on every dashboard request after the view permission, polls included: false refuses the request, and so does a throw. BackPath is the dashboard's back link (Hangfire's AppPath; null, none). Hangfire's read-only polls, POST /stats and Hangfire.Console's POST /console/progress, and the GETs of the dashboard's scripts, styles and fonts and of Hangfire.Console's line poll, pass for a user who holds the view permission, with no manage decision and no line. Only GET and POST pass, and a GET carrying a form is refused: Hangfire's antiforgery check passes GET, HEAD, OPTIONS and TRACE, while its batch commands read the form whatever the method. Hangfire's antiforgery check stays on, so the mapping throws InvalidOperationException at start when no IAntiforgery is registered (AddAntiforgery, which AddControllersWithViews, AddRazorPages and AddRazorComponents also reach), as it does when ViewPermission is blank or ManagePermission or AuthenticationScheme is set and blank; a path that does not start with a single /, name a path after it and end without / throws ArgumentException. The storage connection string is hidden, and every response the filter sees carries Content-Security-Policy: frame-ancestors 'self'. The mapping needs AddSolhigsonHangfire, AddSolhigsonIdentityManager and UseAuthorization after UseAuthentication; never set RouteOptions.SuppressCheckForUnhandledSecurityMetadata to clear the 500 a missing UseAuthorization gives: the view permission then never runs, so every signed-in user opens the dashboard read-only, job arguments and exceptions included, and a manage holder acts on jobs. It returns the endpoint's convention builder: a rate limit set on it must allow each open tab's metrics poll every 2 seconds, Hangfire.Console's polls about once a second (ConsoleOptions.PollInterval) and a page load's burst of assets. Signals: a refused view, and, with ManagePermission set, the manage permission a view-only user lacks on each dashboard page they open, write the permission handler's Warning under Solhigson.Framework.Web.Authorization.PermissionHandler, Permission refused: {Permissions} on {Route} for user {UserId}. Under Solhigson.Framework.Web.Hangfire.SolhigsonDashboardFilter: Warning 3812, AlsoRequire answered false; Error 3813, AlsoRequire threw, the request refused; Error 3814, the manage decision faulted, the request read-only, so nobody can manage jobs until the permission store answers; Error 3815, the endpoint carries AllowAnonymous, which skips its view permission, and every request is refused; Error 3816, no signed-in user reached the filter, refused. A cancellation from AlsoRequire or the manage decision is rethrown, never refused or logged. Information 3811, Jobs dashboard {Method} {Path} authorized for user {UserId}, is written once for each command the filter authorizes, before Hangfire's antiforgery check and the command, so it records the authorization, not the outcome. Minor bump: every type and member is new and no existing behaviour changes, but a consumer's own type named CacheResyncResult, SolhigsonDashboardOptions, SolhigsonDashboardFilter or SolhigsonDashboardEndpointRouteBuilderExtensions, brought into a file by a using directive alongside Solhigson.Framework.EfCore.Caching or Solhigson.Framework.Web.Hangfire, is ambiguous there (CS0104) until it is renamed or the use qualified. 10.31.0: an authenticator code is accepted once per account, and the current-password check (Solhigson.Framework.Identity). AddSolhigsonTwoFactor now registers the framework's authenticator token provider (UsedAuthenticatorStepTokenProvider, internal, closed over the user store's types) under Identity's own name, TokenOptions.DefaultAuthenticatorProvider, over Identity's AuthenticatorTokenProvider for the builder's user type, so every check of an authenticator code under that name passes through it: TwoFactorSignInAsync (through Identity's TwoFactorAuthenticatorSignInAsync), TwoFactorManager's CompleteEnrolmentAsync and DisableAsync, and an app's own UserManager.VerifyTwoFactorTokenAsync under that name; an app that checks codes through Identity's own provider without AddSolhigsonTwoFactor stays replayable. The new public static class UsedAuthenticatorStep describes the guard and holds its constants and StepAt, the time step an instant falls in. A code is checked as Identity checks it (HMAC-SHA1 over the Base32 key, 30-second steps, six digits, two steps either side of now); one whose latest matching step is at or before the step the account last used is refused with one Warning, and each caller answers and counts it as a wrong code: the sign-in Rejected, counted toward lockout; the disable CodeNotValid, counted; the enrolment CodeNotValid, uncounted. Through 10.30.0 a code replayed inside Identity's window was accepted, so a code typed at sign-in could also turn two-factor off. A right code has its step saved in the account's user-token row (LoginProvider [Solhigson], TokenName AuthenticatorLastStep, the step as invariant digits, in clear; no migration) through UserManager.SetAuthenticationTokenAsync before the check answers: an Identity update of the account, which runs its validators, rotates its concurrency stamp and carries its concurrency check, so of two posts of one code only one is accepted. That save is Identity's UpdateAsync, so it saves the scope's whole context, every change a caller has staged on it included, and joins a transaction the app already began on that context (EF's CurrentTransaction, or an ambient TransactionScope the connection enlisted in), whose rollback undoes it and leaves the code usable again in its window: a caller checks the code before it stages writes, or begins a transaction, of its own on that context. A step that cannot be read or saved (a write Identity refuses, one lost on the concurrency stamp, a throw) refuses the code, fail closed, with one Warning naming Identity's error codes or the exception's type, the unsaved changes on the account and its token rows put back, a put-back that throws writing one Error under the same logger, Two-factor change failed for user {UserId} at step DiscardUnsavedWrites: {ExceptionType}; a stored step that is not invariant digits refuses every code, with one Warning, until a reset removes it; a server clock set back past a stored step refuses every code until it passes that step again. A cancellation is rethrown, the changes put back. Within one DI scope a code once refused stays refused and one once accepted stays accepted, its line and its save not repeated, remembered by account, key (its SHA-256) and step; an interactive server circuit is one scope, so a code asked again there is accepted again, and an app asking a code before each act in an interactive component checks each in a fresh scope or asks once per circuit. The lines go under the logger Solhigson.Framework.Identity.AuthenticatorStep (UsedAuthenticatorStep.LoggerCategory), naming the account's id only: Authenticator code refused for user {UserId}: its time step is at or before the last one the account used (event SolhigsonAuthenticatorStepReused); ... its time step could not be recorded ({Reason}) (SolhigsonAuthenticatorStepNotRecorded); ... the last time step stored for the account cannot be read (SolhigsonAuthenticatorStepUnreadable). DisableAsync and ResetAsync remove the step's row in the key's own save, so a factor enrolled again starts with no used step. The host now also fails at start (OptionsValidationException) when IdentityOptions.Tokens.AuthenticatorTokenProvider names a provider whose code check is still Identity's AuthenticatorTokenProvider's for the builder's user type: Identity's provider itself (its token providers registered again after AddSolhigsonTwoFactor, or under another name) or a subclass whose ValidateAsync is still Identity's, read through the interface map; a host's own provider with a code check of its own is kept, unguarded, only under a name of its own named in IdentityOptions.Tokens.AuthenticatorTokenProvider, and one registered under the default name before AddSolhigsonTwoFactor is replaced by the guarded one. The check reads only the provider type registered last under the authenticator name, whatever user type it is for, so a host that registers Identity's token providers for a second user type after AddSolhigsonTwoFactor can leave this user type's user manager resolving Identity's unguarded provider unseen: such a host calls AddSolhigsonTwoFactor after every other token-provider registration. Changes to existing members: a right code at CompleteEnrolmentAsync and DisableAsync makes one more save, the step's, first; a right code whose step save Identity refuses, loses on the concurrency stamp (an out-of-date copy of the account, read before another request's save, which a double post of the code can be) or throws now answers CodeNotValid, where a refused, lost or thrown write of a right code answered Failed: uncounted at CompleteEnrolmentAsync; at DisableAsync counted as a wrong code, with EndSessions when Identity's count cannot be saved, as on an out-of-date copy, or NotEnrolled, uncounted, when the account read again has two-factor off; at TwoFactorSignInAsync such a code answers Rejected, counted; at DisableAsync a caller's unsaved changes to the account are saved by the step's save, before the removal's transaction and outside it, where they were saved inside it; and at TwoFactorSignInAsync a right code whose sign-in lost its save to a parallel request is used up all the same. SolhigsonIdentityManager gains CheckPasswordAsync(user, password), the one current-password check, which ChangePasswordAsync now runs by the same code, for an act a session alone must not make (enrolling a second factor, say). In order: an unusable user store and a request store holding changes not yet saved answer Failed with one Error, nothing checked, so a caller stages nothing before the call; a disabled account Failed with one Warning; one with no password NoPassword; one locked before the call LockedOut, nothing counted, no line; a blank password CurrentNotValid with one Warning, uncounted; else SignInManager.CheckPasswordSignInAsync with lockout on failure: an account Identity may not sign in (IsNotAllowed, an unconfirmed email where one is required) CurrentNotValid with one Warning, uncounted, its password not checked; a wrong password CurrentNotValid with one Warning, counted toward lockout as a wrong sign-in is, the one that locks the account LockedOut with one Warning, and a right one the new PasswordOutcome.Proved, with an empty Message and no line. Identity's own writes in its check (a count, a lockout, a rehash that rotates the security stamp) stand; one it leaves unsaved is put back and answers Failed with one Error. Without a request, an account with two-factor on answers Failed at step CheckPasswordSignInAsync. Nothing throws but the caller's cancellation, read as the call begins. Each call adds one to the password counter under the new method tag check (PasswordDiagnostics.CheckMethod), the outcome proved for Proved (PasswordDiagnostics.Text), and every line names the method check. PasswordResult gains LockedByThisAttempt: true only for a LockedOut change or check whose own wrong password locked the account, false for one locked before the call, so a caller records the lockout once; a change's locking attempt now sets it. TwoFactorManager gains CanEnrol(user), the enrolment methods' own first refusal with no side effect: false with two-factor switched off, for an account with two-factor on, and on a host that cannot store a key encrypted; it reads nothing from the database and writes, counts and logs nothing, and throws when the host's two-factor switch throws. UpdateLastLoginTimeAsync now puts back a write Identity refuses or that throws, the account's entry, owned values included, left as last read or saved, so a later save of the request's store writes none of it: a refused write, silent before and left for a later save to write, writes one Error under Solhigson.Framework.Identity, Sign-in: last login time of account {UserId} not written: Identity refused it: {ErrorCodes}, and throws nothing; a throw goes on as before. The new public TimeFloor (its constructor, Start, Clock, Span, Remaining, WaitAsync and MaxSpan) is the floor under a call's duration RequestPasswordResetAsync used privately; that floor is unchanged. Minor bump: beside the changes named, every type and member is new, but a consumer's own type named UsedAuthenticatorStep or TimeFloor, brought into a file by a using directive alongside Solhigson.Framework.Identity, is ambiguous there (CS0104) until the local copy is renamed or the use qualified; and a switch over PasswordOutcome that throws on a value it does not name meets Proved only from CheckPasswordAsync. 10.30.0: the password flows (Solhigson.Framework.Identity). SolhigsonIdentityManager gains RequestPasswordResetAsync, IssuePasswordResetAsync, ResetPasswordAsync and ChangePasswordAsync. None throws but on the caller's cancellation: a step that throws answers Failed with one Error naming the method, the step and the exception's type, never its message. Every call adds one to the counter password on the meter Solhigson.Framework.Identity, tagged method (request_reset, issue_reset, reset, change) and outcome (PasswordDiagnostics.Text of the outcome, or cancelled), and the lines go under the logger name Solhigson.Framework.Identity.Password, naming a user by its id, never by an address, a token or a password. RequestPasswordResetAsync(email), for a page anyone can reach, answers a PasswordResetRequest: Outcome, the new enum PasswordResetOutcome (Send, NoSend, InvalidEmail, Failed), and, for Send only, UserId, Email (the address the store holds, the one the link is mailed to, never the one typed) and Token, Identity's reset token. The framework builds no link: the app builds its scheme and host from its own configured public address, never from the request's Host or forwarded headers. The address, trimmed, that is blank, longer than 256 characters or refused by EmailAddressAttribute answers InvalidEmail with nothing read. The users whose NormalizedEmail is the address normalized are read, two at most, in one query: none, or one not Enabled or with no address, answers NoSend; two answer NoSend with one Warning naming both, and neither is sent a link. A locked-out account is sent its link. A user is sent at most three links in a fixed hour from the first counted, counted in the ICounterStore: past three it answers NoSend with one Warning. A count the store answers unavailable, one not answered by 50 milliseconds before the floor's end, and no store registered each let the link go uncapped, the first two written once while they last, no store once per logger factory. Every request returns no sooner than 400 milliseconds after it was called, on the services' TimeProvider, TimeProvider.System when they hold none, but where the floor's own delay throws, which answers Failed at once. IssuePasswordResetAsync(userId), for an administrator sending a link to a known user, answers Send for an enabled user holding an address and NoSend otherwise, with no floor and no cap. ResetPasswordAsync(userId, token, newPassword) and ChangePasswordAsync(user, currentPassword, newPassword) answer a PasswordResult: Outcome, the new enum PasswordOutcome (None, never answered; Done, TokenNotValid, PasswordRefused, Failed, NoPassword, LockedOut, CurrentNotValid, PasswordUnchanged), Message (a PasswordMessages sentence, empty for Done), Errors (Identity's, for PasswordRefused), EndSessions, HadTwoFactor and StillLockedOut. A reset answers TokenNotValid, one sentence, alike in answer, not in time, for an id that does not parse, a missing or disabled user and a token Identity refuses, the token checked before anything of the account changes; PasswordRefused for a new password the app's password validators refuse, the breached-password check among them when registered; else one save through UserManager.ResetPasswordAsync sets the password, rotates the security stamp, so a token is used once, sets RequirePasswordChange false, and clears the lockout end and the failed count only for an account with two-factor off. Two-factor stays on, and an account with it on keeps its lockout, which StillLockedOut reports. A change answers NoPassword for an account with none; LockedOut for one locked before the call; CurrentNotValid for a wrong or blank current password, a wrong one counted toward lockout through SignInManager.CheckPasswordSignInAsync, and LockedOut for the one that locks the account; PasswordUnchanged for the current password again; PasswordRefused; else one save of the new hash, RequirePasswordChange false and a new security stamp, answered Done, and the request's own sign-in, when it is the user's, is refreshed so this device stays signed in. It answers Failed, nothing checked, for a disabled account and while the request's context holds a change not yet saved, which Identity's saves in the current-password check would commit. Done sets EndSessions (a change's: the user's other sessions), as does a Failed whose save could not be read back, since the password may be set. A reset and a change write only through Identity's EF UserStore, or a subclass, saving with each write, and answer Failed on any other store, or with none. Outside the new methods: UpdateLastLoginTimeAsync given no time stamps the manager's TimeProvider's now, not DateTime.UtcNow; and the account's context, which the wrong-code lockout and UnlockAsync's put-back write through, is the user store's own for any store derived from Identity's ten-parameter EF UserStore, the one AddEntityFrameworkStores registers, where 10.29.0 matched the four-parameter UserStore only and used the manager's context otherwise. Minor bump: every type and member is new, beside those two changes, but a consumer's own type named PasswordResetRequest, PasswordResetOutcome, PasswordResult, PasswordOutcome, PasswordMessages or PasswordDiagnostics, brought into a file by a using directive alongside Solhigson.Framework.Identity, is ambiguous there (CS0104) until the local copy is renamed or the use qualified or aliased. 10.29.0: the role screens' reads and a safer create (Solhigson.Framework.Identity). HeldPermission gains Removable, an init property: on HeldPermissionsAsync's answer it is true for a grant RemoveGrantsOutsideOfferAsync would remove, set from the same permission-group reconciler verdict the removal judges by, the one rule both read: a grant outside its group (OutsideGroup), one naming an undeclared permission that is no menu root, and one naming no stored permission (Missing). It is false for an offered grant, for a NoDeclaration grant the removal keeps (an undeclared menu root, or a name the store's collation matches to a declaration allowing the group), for a grant in an unknown group, and for every grant when no permission groups are registered; the removal judges each grant again when it runs, so a page counts what it would take from Removable, never from Class. RoleAdministration.PermissionsAsync(actingUserId) answers a PermissionCatalogue: every stored permission, enabled or not, in the role editor's order, the one OfferedPermissionsAsync gives an offer, as a CataloguedPermission (its id, name, description and parent id; the parent's name and description, joined in the store, null for a parent id naming no stored permission; the role groups its declaration allows, as GetAllowedGroupsAsync reads them, null when it has no valid declaration and for every permission when no permission groups are registered; and the roles holding a stored grant of it, each once as a CataloguedRole, its key as text and its name, ordered by name ordinally, a role stored with no name last by id, a grant naming no stored role naming none), with GroupsRegistered, whether the app registers permission groups. It refuses NoRules and ActorRefused as ListAsync does and otherwise answers any stored, enabled actor whatever it may grant, so the app gates who may view the permissions page. It makes three reads after the caller's load, whatever the number of permissions, grants or roles, an app's query filter on the roles applying, and is counted and logged under the method permissions, a catalogue answered writing no line. CreateAsync now refuses InTransaction, with no line, when the scope's context has a transaction open or an ambient one is, checked after MayCreateRoleAsync, as SetPermissionsAsync, RemoveGrantsOutsideOfferAsync and DeleteAsync refuse: the create commits its own, and its read back must see only a committed role. Once Identity's save has stored the role, the read back takes no token, so a caller that goes away after the save still gets Done, the create's Information line and a summary its audit can follow. Where a cancelled save throws an OperationCanceledException (SQLite, PostgreSQL), it is checked with no token: a role stored under its id answers Done, anything else rethrows the cancellation, and a check that throws answers Failed. On SQL Server EF wraps the cancellation in a DbUpdateException, which takes the name check with the caller's token: a cancelled caller's create is rethrown as a cancellation, though the role may be stored, and one whose request token fired while the caller's is live may answer IdentityFailed with DuplicateRoleName for the role it stored. A Failed create may also have stored the role: its Error under RoleAdministration names the role's id only once the role is known stored (the save returned, or a cancelled save's check found it) and the summary read failed, and names the role new otherwise, so the app looks the role up by name before treating a Failed or cancelled create as no role. A cancellation before the save is rethrown, as before. Minor bump: every member is new; a create inside a transaction now answers InTransaction, and one cancelled after its save Done, as is one whose save the cancellation interrupts where it throws as one.