Pds: MapAtProtoPds cannot exclude or override individual XRPC endpoints #39
Labels
No labels
breaking-change
bug
documentation
duplicate
enhancement
good first issue
help wanted
performance
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/ATProto.NET#39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
MapAtProtoPds()maps all PDS XRPC endpoints unconditionally. There is no way to exclude, replace, or wrap a single endpoint — attempting to map the same route yourself produces an ambiguous-match conflict.Concrete need: Updraft must own
com.atproto.server.createAccountto enforce real invite-code validation (see the invite-codes issue). The only way today is terminal middleware registered beforeMapAtProtoPds()that matches the path manually and never callsnext()— workable, but it bypasses endpoint routing (no endpoint metadata, no route-level auth policies, easy to get subtly wrong).Suggestion, either of:
MapAtProtoPds(options => options.Exclude("com.atproto.server.createAccount"))so consumers can map their own implementation, orPdsService(e.g. anIAccountCreationGuardinvoked insideCreateAccountAsync) so the default endpoint stays but policy is pluggable.The hook approach composes better with the invite-store suggestion; the exclude approach is more general.