re: https://blacksky.community/profile/did:plc:rnpkyqnmsw4ipey6eotbdnnf/post/3mbd6qic7kk2q
This adds a set of middleware functions that can add some constraints by either and/or did, handle, and scope.
re: https://blacksky.community/profile/did:plc:rnpkyqnmsw4ipey6eotbdnnf/post/3mbd6qic7kk2q
This adds a set of middleware functions that can add some constraints by either and/or did, handle, and scope.
example
```
// Multi-community endpoint
.route("/xrpc/community.shared.moderation.report",
post(report).layer(from_fn_with_state(
with_rules(AuthRules::All(vec![
AuthRules::HandleEndsWithAny(vec![
".blacksky.team".into(),
".bsky.team".into(),
".mod.social".into(),
]),
AuthRules::ScopeEquals("atproto".into()),
]), &state),
auth_middleware
)))
```