feat(join): authenticated accept-by-code endpoint + iOS contract #238
No reviewers
Labels
No labels
epic
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
phase-7
phase-8
phase-9
priority/P0
priority/P1
priority/P2
type/backend
type/client
type/docs
type/ops
type/security
type/spike
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/failsulit!238
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/join-by-code-234"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resolves #234 — authenticated join-by-code is now usable end-to-end.
Server
New
POST /api/invitations/code/{code}/accept(authenticated, "auth" rate-limit partition): delegates toInvitationAcceptanceService.AcceptAsync(token: code)— the service already matchesShortCode == tokenfor the registration flow. Targeted invitations enforce email/user match inside the service; for open invitations the code is the capability secret (2^40, rate-limited surfaces). Rule 6b (full-token proof on the id-route) is preserved — restructured around a singlehasValidTokenProofcomputation, and the rule-5 email bypass is closed unless token-proofed (dual-pass review finding: a null-email account could previously claim an email-targeted invite).Authz matrix row added (SEC-03 coverage test).
iOS
JoinTenantViewModel authenticated accept posts to the code-keyed endpoint (the entered code — no invitation-id dependency); slice-3 nil-id guard removed as obsolete; stubs re-keyed.
Tests
dotnet testrunner is broken — missing prerelease testhost in the NuGet cache).Review
Dual-pass: reviewer found the rule-5 null-email bypass (fixed: closed unless token-proofed) + full-token alias doc + Guid-as-code guard test + #236 follow-up already filed. Coverage: project gate covers FailSulit.Api — the new endpoint is exercised by the 7 new integration tests.