nuts-foundation / nuts-node

The reference implementation of the Nuts specification. A decentralized identity network based on the w3c ssi concepts with practical functionality for the healthcare domain.
https://nuts-foundation.gitbook.io
GNU General Public License v3.0
25 stars 16 forks source link

DIDMan: Resolve endpoints or compound services. #340

Closed stevenvegt closed 3 years ago

stevenvegt commented 3 years ago

Allow an application to resolve endpoints for a certain DID. Use the spec at https://github.com/nuts-foundation/nuts-specification/issues/78.

Create api endpoint in DIDMan to resolve endpoints for a did by type. This should automatically follow refs. It returns a map[name]URI.

GET nodeaddress:port/internal/didman/v1/did/{did}/serviceEndpoint?type={type}

Example:

GET nodeaddress:port/internal/didman/v1/did/did:nuts:123/serviceEndpoint?type=eOverdracht

{
  "fhir": "ref:did:nuts:555/serviceEndpoint?type=fhir-production",
  "auth": "ref:did:nuts:555/serviceEndpoint?type=oauth-production",
}

Gets internally resolved to:

{
  "fhir": "http://api-prod.example.com/fhir",
  "auth": "https://auth.example.com/token"
}
reinkrul commented 3 years ago

@stevenvegt isn't this fixed now?

stevenvegt commented 3 years ago

It was not broken. This is a proposal for endpoint resolving. Will be build along side the demo ehr needs.

reinkrul commented 3 years ago

I meant "solved", of course :-)

woutslakhorst commented 3 years ago

It might even be an API for vdr and not didman since resolving references is defined by the specs.

woutslakhorst commented 3 years ago

as discussed: didman

woutslakhorst commented 3 years ago

Currently didman has only a single API for 'getting' endpoints: getCompoundServices which returns a list of compound services for a DID. It should specify if these use resolved URLs or not.