Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for did:web in out-of band invitations #3377

Open
FilipRazek-archipels opened this issue Dec 4, 2024 · 0 comments
Open

Support for did:web in out-of band invitations #3377

FilipRazek-archipels opened this issue Dec 4, 2024 · 0 comments

Comments

@FilipRazek-archipels
Copy link

The PR #1866 added support for a universal resolver flag, which allows Acapy to resolve more did methods. However, when receiving an out-of-band invitation, the agent currently expects one of two options in the service field:

  • Either a service block, which contains an endpoint, recipientKeys...
  • Or a string, which is interpreted as a did:peer or a did:sov DID, extracting the public DID from the field to construct the service block
# acapy_agent/protocols/out_of_band/v1_0/manager.py:1048
service = invitation.services[0]
public_did = None
if isinstance(service, str):
    # If it's in the did format, we need to convert to a full service block
    # An existing connection can only be reused based on a public DID
    # in an out-of-band message (RFC 0434).
    # OR did:peer:2 or did:peer:4.

    if service.startswith("did:peer"):
        public_did = service
        if public_did.startswith("did:peer:4"):
            public_did = self.long_did_peer_to_short(public_did)
    else:
        public_did = service.split(":")[-1]

However, this does not work for did:web, which are interpreted as public DIDs (which they aren't), and not as URLs.
Is this a bug or am I misunderstanding something about the format of DIDs expected by Acapy?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant