An alternative IdentityResolver that goes through a service (e.g. Slingshot, AppView) using com.atproto.identity.resolveDid or com.atproto.identity.resolveHandle. The only problem I can see with this is attempting to resolve a DID document over Slingshot which is not currently supported. Perhaps which endpoints it uses should be configured and an UnsupportedEndpointError could be returned and an extra resolve_handle method could be added to IdentityResolver for just resolving the DID from a handle.
I would also suggest pulling the resolve_subject part out and requiring a DID for resolve (maybe renaming it to resolve_did?) for consistency.
Thanks, this is a good idea and I'd like to roll with it. A couple of adjustments to the shape:
I'd rather not make
resolveDID-only. Most callers pass handles,resolve_verifieddepends on that, andDidResolveralready covers the DID-only case. Instead I'm splitting the trait into aHandleResolverand a DID-document resolver that combine into anIdentityResolver. Then "handles from Slingshot, documents from the PLC directory" is just a pairing, with no runtimeUnsupportedEndpointError.The XRPC resolver itself will use
com.atproto.identity.resolveIdentitywhere the service has it, andresolveHandlefor handle-only services. It'll still check that the document'sidmatches and thatalsoKnownAslists the handle, because the documents carry signing keys and I don't want to trust the service's answer blindly.