Obtaining credentials
AfterSome use cases require credentials besides the X509Credential. Check the use case's Discovery Service and policy definitions to see which credentials you createdneed.
A credential is issued in one of two ways, depending on the use case:
Example: HealthcareProviderRoleTypeCredential
The HealthcareProviderRoleTypeCredential states the type of care organization, e.g. H1 (huisartsinstelling) or X3 (verplegings- of verzorgingsinstelling). Huisartsinzage requires it. VZVZ might issue it in the future; until then, care organizations issue it themselves.
Before you start
Issueand a Verifiable Credential
With the Nuts node, you can issue any kind of credential from one of your subjects to any resolvabledid:web DID (did:nuts,see did:web,"Create did:keya andsubject").
Issue the credential is and how it can be used is determined by the use case.
POST <internal Nuts interface>/internal/vcr/v2/issuer/vc
Content-Type: application/json
{
"@context": "https://nuts.nl/www.w3.org/2018/credentials/v1",
"type": "NutsOrganizationCredential"HealthcareProviderRoleTypeCredential",
"issuer": "did:web:nuts.example.com:iam:issuer"657f064a-ebef-4f0f-aa87-88ed32db3142",
"credentialSubject": {
"id": "did:web:nuts.example.com:iam:657f064a-ebef-4f0f-aa87-88ed32db3142",
"organization": {
"name"roleCodeNL": "Care bears",
"city": "Care town"
}X3"
},
"withStatusList2021Revocation"expirationDate": true"2027-10-27T00:00:00Z",
"format": "jwt_vc"
}
See
issuer Theand withStatusList2021RevocationcredentialSubject.idoptionare allowsboth forthe credentialcare revocation.
Response:
{it "@context":[
"https://nuts.nl/credentials/v1",
"https://w3id.org/vc/status-list/2021/v1",
"https://w3c-ccg.github.io/lds-jws2020/contexts/lds-jws2020-v1.json",
"https://www.w3.org/2018/credentials/v1"
],
"type":["NutsOrganizationCredential","VerifiableCredential"],
"id":"did:web:example.com:iam:issuer#f2fb02d3-6216-47b9-8e54-b30438a1090e",
"issuanceDate":"2024-09-09T14:09:50.901123+02:00",
"issuer":"did:web:example.com:iam"issuer",
"credentialStatus":{
"id":"https://example.com/statuslist/did:web:example.com:iam:issuer/1#5",
"statusListCredential":"https://example.com/statuslist/did:web:example.com:iam:issuer/1",
"statusListIndex":"5",
"statusPurpose":"revocation",
"type":"StatusList2021Entry"
},
"credentialSubject":{
"id":"did:web:example.com:iam:657f064a-ebef-4f0f-aa87-88ed32db3142",
"organization":{
"name":"Care bears",
"city":"Care town"
}
},
"proof":{...}
}
Load a Verifiable Credential
The Nuts node currently doesn't support a new (Nuts network is deprecated) method for exchanging Verifiable Credentials from issuer to holder. The issuer will have to sendissues the credential to theitself.
format jwt_vc. The ldp_vc, roleCodeNL.
Set expirationDate. Without it, the withStatusList2021Revocation.
The response is the credential as a JWT, in double quotes.
POSTLoad /internal/vcr/v2/holder/did:web:example.com:iam:657f064a-ebef-4f0f-aa87-88ed32db3142/vcthe {credential into the wallet
Issuing doesn't put the credential in the wallet. Load it as described in "@context":[Load "https://nuts.nl/credentials/v1"the credential into the wallet", "https://w3id.org/vc/status-list/2021/v1"using the response from the step above as the request body.
Lifecycle
Issue and load a new credential before expirationDate, "https://w3c-ccg.github.io/lds-jws2020/contexts/lds-jws2020-v1.json",and "https://www.w3.org/2018/credentials/v1"when ],the "type":["NutsOrganizationCredential","VerifiableCredential"],care "id":"did:web:example.com:iam:issuer#f2fb02d3-6216-47b9-8e54-b30438a1090e",organization's "issuanceDate":"2024-09-09T14:09:50.901123+02:00",type "issuer":"did:web:example.com:iam"issuer",changes.
API "id":"https://example.com/statuslist/did:web:example.com:iam:issuer/1#5",reference: "statusListCredential":"https://example.com/statuslist/did:web:example.com:iam:issuer/1",Verifiable "statusListIndex":"5",Credential "statusPurpose":"revocation",Registry "type":"StatusList2021Entry"(v2)