feat(bff): owner-scoped self-service withdraw endpoint (S-11c-1, refs #12) #90
Reference in New Issue
Block a user
Delete Branch "feat/12-withdrawal-bff"
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?
What & why
Third sub-slice of S-11 · Withdrawal (Flow 3) (#12) — the owner-scoped BFF withdraw endpoint (backend). S-11a/b made a withdrawal transition the aggregate and cancel the workflow; this adds the citizen-facing entry point through the BFF, gated to the registration's owner.
WithdrawRegistrationCommandcarries the caller'sbsn; the handler returns aWithdrawOutcomeand refuses a bsn that doesn't own the registration. Unknown and not-owned are both 404 (indistinguishable — ownership isn't revealed).POST /registrations/{id}/withdrawtakes{bsn}and maps the outcome (204/404).POST /self-service/registrations/{id}/withdraw(DigiD-authenticated) forwards the token'sbsnto the domain and relays 204/404. The BFF authenticates; the domain owner-scopes (an aggregate invariant, not the domain doing auth).run-domain-check.shwithdrawal step now sends the ownerbsn(verify-stack).Refs #12 — the self-service "trek aanvraag in" button + e2e (S-11c-2) closes it.
Definition of Done
refs #12).docker compose upunaffected.Notes for reviewers
dotnet format --verify-no-changesclean;make unitgreen — Acl 27, EventSubscriber 19, BFF 30, Acceptance 9, Big 95;api-clientlint+test green.