pub async fn resolve_cimd_client(
state: &OAuthState,
client_id_url: &str,
) -> Result<RegisteredClient, String>Expand description
Resolve a CIMD client: cache-aside lookup, fetch on miss.
Hot-path entry point used by /oauth/par and /oauth/authorize.
Returns the registered client (cached or freshly fetched + cached).
Trust gate (unified federation policy): before fetching unknown
metadata from the network, the client_id URL’s origin must pass
a PolicyService federation:register check. Same gate used for peer
entity statements — one trust decision for “isolated vs federated”
per the atproto model. Fails CLOSED — any RPC error rejects the
registration rather than silently degrading security posture.