Repository navigation
feat: add built-in rate limiting and client HTTP 429 handling - #134
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev #134 +/- ##
==========================================
+ Coverage 86.88% 87.03% +0.15%
==========================================
Files 682 689 +7
Lines 19044 19335 +291
Branches 2319 2375 +56
==========================================
+ Hits 16546 16828 +282
+ Misses 1747 1742 -5
- Partials 751 765 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add native ASP.NET Core rate limiting to UltimateAuth endpoints and preserve client authentication state when requests receive HTTP 429.
UseUltimateAuth()middleware integration opt-in; enable it by default inUseUltimateAuthWithAspNetCore()with explicit opt-out. Retain original public signatures and protect repeated and child-pipeline installations.rate_limitederrors and optionalRetry-After. Preserve state and credentials during throttled validation/refresh, defer maintenance retries, and avoid reporting rejected logout as success.Compatibility and limitations
UseRateLimiter()should opt out of helper-owned installation. Native endpoint policies do not compose; built-in inline policies own their rejection response. Select an application named policy to use application rejection behavior.Retry-Afterexposed by CORS; missing guidance uses the documented maintenance cooldown. Logout redirect/network failure can leave the server outcome uncertain and is not automatically replayed.Validation
Executed in Release using SDK 10.0.403; no test filters:
UltimateAuth.slnxAll 3,386 .NET tests passed with no failures or skips. The test builds also reported existing CS0618 obsolete-uniqueness warnings in unchanged reference/test code and MUD0002 in the unchanged IdentityLab dashboard. No new package dependencies or target-framework changes were introduced.
The full solution build regenerated documentation JSON caches; those build outputs were removed from this change. The final diff contains only the 48 intended source, test, documentation and solution files.
The main shared business-flow fixture opts out of throttling to avoid shared-host quota interference. The explicit limiter/client regression fixtures enable real middleware and exercise rejection, proof/refresh preservation, authenticated isolation and global/native-policy interaction.
git diff --checkpasses. The whitespace formatter initially flagged new compact initializers; those have been formatted. Its remaining 18 diagnostics match the untoucheddevversions of the same files exactly, apart from line offsets, and were left unchanged to avoid unrelated formatting changes.