docs(identity): document the profile ETag/If-Match precondition - #246
Open
marcelo-maciel wants to merge 1 commit into
Open
docs(identity): document the profile ETag/If-Match precondition#246marcelo-maciel wants to merge 1 commit into
marcelo-maciel wants to merge 1 commit into
Conversation
`PUT /identity/profile` gained an optimistic concurrency precondition: `GET /profile` returns the user's `ConcurrencyStamp` as a strong `ETag`, `PUT` honours `If-Match`, and a stale token is answered with `412` instead of overwriting the newer write. Documents the optional-header behaviour, the `*` and weak-validator rules, why a malformed header is a `400`, the guard running ahead of any storage call, and the retry-once guidance for clients (the stamp rotates on writes a user does not perceive as profile edits). Also notes the CORS requirement, since the contract is invisible to a browser on another origin without the `ETag` exposure and the `if-match` allow-entry. Accompanies fullstackhero/dotnet-starter-kit#1366.
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.
Documents the optimistic-concurrency precondition added to
PUT /identity/profileinfullstackhero/dotnet-starter-kit#1366 (fixes fullstackhero/dotnet-starter-kit#1359).
Identity module page
New Profile concurrency section under Public API highlights: what the lost update looked
like, the
ETag/If-Matchexchange with a short HTTP sample, and the details a caller actuallytrips over:
If-Match: *is acceptedIf-Matchmandates the strong comparison function400, not412(a412would trap a client in a retry loop itcannot win)
avatar nor clears the current one
412, since the stamp also rotates on writes a userdoes not think of as profile edits (password change, new avatar, failed sign-in)
ETagexposure and theif-matchallow-entryThe two
/profilerows in the endpoints table now mention theETagand theIf-Match/412behaviour.
Changelog
One dated entry for the fix plus a second for the CORS change, since anyone who replaced the
kit's CORS policy with their own has to carry the
ETagexposure and theif-matchallow-entryor the precondition silently degrades back to a lost update.
npx astro check: 0 errors, 0 warnings (21 pre-existing hints).The changelog heading is dated
2026-08-17, the day the code PR opened, following docs#239. Happy tomove it to the merge date if the code PR lands later.