Repository navigation
Include the fix for shared user token refreshes in ATM 4.3.x - #372
Merged
pgermishuys merged 3 commits intoOct 16, 2026
Merged
Conversation
This was referenced Oct 16, 2026
Erwinvandervalk
approved these changes
Oct 16, 2026
Concurrent user token refreshes were merged on the refresh token alone, so a request for one resource could get the access token issued for another (#360). The default IUserTokenRequestConcurrencyControl now only merges requests that would send the same token request: the same refresh token and DPoP key, resource, scope, challenge and sign-in scheme, caller-supplied client assertion and additional parameters. Requests with different parameters each get their own token. IUserTokenRequestConcurrencyControl gets an overload that receives the request parameters. It's a default interface method that forwards to the original method, so existing implementations keep working unchanged. Combining different parameters (resource isolation) with one-time-use refresh tokens is not supported, and the interface documents this. (cherry picked from commit 83fb6e7)
Refreshes for different parameters can now run concurrently, including their stores. Within one HTTP request, concurrent StoreTokenAsync calls on the default authentication-session store raced on the shared authentication properties (a duplicate-key exception on .TokenNames), the per-request authenticate cache and the sign-in. The store now reads, and reads/updates/signs in/caches, one at a time per request, using a lock in the request-scoped AuthenticateResultCache. Each store builds on the previous one, so the cookie keeps the tokens for every resource. (cherry picked from commit 6856858)
(cherry picked from commit 76b1f53)
pgermishuys
force-pushed
the
pg/atm-4.3-refresh-per-parameters
branch
from
October 16, 2026 12:58
213df9d to
48e845b
Compare
pgermishuys
changed the base branch from
releases/atm/4.3.x
to
releases/atm/4.2.x
October 16, 2026 13:09
pgermishuys
changed the base branch from
releases/atm/4.2.x
to
releases/atm/4.3.x
October 16, 2026 13:09
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.
Brings #366 to 4.3.x, which fixes #360. Concurrent user token refreshes that share a refresh token were merged on the refresh token alone, so with resource isolation a request for one resource could get the access token issued for another. The default
IUserTokenRequestConcurrencyControlnow only merges requests that would send the same token request. The interface gets anExecuteWithConcurrencyControlAsyncoverload that receives the request parameters; it's a default interface method, so existing implementations keep compiling and behave as before.Combining different parameters with one-time-use (rotating) refresh tokens isn't supported, and the interface docs say so.
Cherry-picked the three commits of #366 with
git cherry-pick -x, no conflicts.Merge order: fourth of five, after #371. Until the earlier ones merge, this PR also shows their commits.