Credential Templates
Verifiable Credential templates/types setup
CLI
You can import a DID document using:
config --as-issuer default vc templates import --name TestCredential credential-template.jsonThe value "default" of --as-issuer refers to the tenantId.
By specifying vc templates --help you can also view other VC template commands (besides import you can list, export and remove)
REST API
List templates you have
GET /issuer-api/{tenantId}/config/templates
curl -X 'GET' \
'http://localhost:8080/issuer-api/default/config/templates' \
-H 'accept: application/json'By default, only the template ID will be shown, but the full template will not be loaded.
[
{
"mutable": false,
"name": "Europass",
"template": null
},
{
"mutable": false,
"name": "VerifiableAuthorization",
"template": null
},
{
"mutable": false,
"name": "VerifiableVaccinationCertificate",
"template": null
},
{
"mutable": false,
"name": "KycCredential",
"template": null
},
{
"mutable": false,
"name": "DataSelfDescription",
"template": null
},
{
"mutable": false,
"name": "VerifiableId",
"template": null
},
{
"mutable": false,
"name": "UniversityDegree",
"template": null
},
{
"mutable": false,
"name": "VerifiableMandate",
"template": null
},
{
"mutable": false,
"name": "ProofOfResidence",
"template": null
},
{
"mutable": false,
"name": "AmletCredential",
"template": null
},
{
"mutable": false,
"name": "OpenBadgeCredential",
"template": null
},
{
"mutable": false,
"name": "VerifiableDiploma",
"template": null
},
{
"mutable": false,
"name": "DataConsortium",
"template": null
},
{
"mutable": false,
"name": "DataServiceOffering",
"template": null
},
{
"mutable": false,
"name": "VerifiableAttestation",
"template": null
},
{
"mutable": false,
"name": "KybCredential",
"template": null
},
{
"mutable": false,
"name": "PermanentResidentCard",
"template": null
},
{
"mutable": false,
"name": "EuropeanBankIdentity",
"template": null
},
{
"mutable": false,
"name": "Iso27001Certificate",
"template": null
},
{
"mutable": false,
"name": "LegalPerson",
"template": null
},
{
"mutable": false,
"name": "ParticipantCredential",
"template": null
},
{
"mutable": false,
"name": "GaiaxCredential",
"template": null
},
{
"mutable": false,
"name": "VerifiablePresentation",
"template": null
},
{
"mutable": false,
"name": "PeerReview",
"template": null
},
{
"mutable": false,
"name": "ServiceOfferingCredential",
"template": null
},
{
"mutable": false,
"name": "KybMonoCredential",
"template": null
},
{
"mutable": false,
"name": "Email",
"template": null
}
]Show a VC template
GET /issuer-api/{tenantId}/config/templates/{templateId}
curl -X 'GET' \
'http://localhost:8080/issuer-api/default/config/templates/VerifiableId' \
-H 'accept: application/json'Response for "VerifiableId" credential:
{
"type": [
"VerifiableCredential",
"VerifiableAttestation",
"VerifiableId"
],
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"id": "urn:uuid:3add94f4-28ec-42a1-8704-4e4aa51006b4",
"issuer": "did:ebsi:2A9BZ9SUe6BatacSpvs1V5CdjHvLpQ7bEsi2Jb6LdHKnQxaN",
"issuanceDate": "2021-08-31T00:00:00Z",
"issued": "2021-08-31T00:00:00Z",
"validFrom": "2021-08-31T00:00:00Z",
"credentialSchema": {
"id": "https://api.preprod.ebsi.eu/trusted-schemas-registry/v1/schemas/0xb77f8516a965631b4f197ad54c65a9e2f9936ebfb76bae4906d33744dbcc60ba",
"type": "FullJsonSchemaValidator2021"
},
"credentialSubject": {
"id": "did:ebsi:2AEMAqXWKYMu1JHPAgGcga4dxu7ThgfgN95VyJBJGZbSJUtp",
"currentAddress": [
"1 Boulevard de la Libert�, 59800 Lille"
],
"dateOfBirth": "1993-04-08",
"familyName": "DOE",
"firstName": "Jane",
"gender": "FEMALE",
"nameAndFamilyNameAtBirth": "Jane DOE",
"personalIdentifier": "0904008084H",
"placeOfBirth": "LILLE, FRANCE"
},
"evidence": [
{
"documentPresence": [
"Physical"
],
"evidenceDocument": [
"Passport"
],
"subjectPresence": "Physical",
"type": [
"DocumentVerification"
],
"verifier": "did:ebsi:2A9BZ9SUe6BatacSpvs1V5CdjHvLpQ7bEsi2Jb6LdHKnQxaN"
}
]
}Add a new VC template
POST /issuer-api/{tenantId}/config/templates/{templateId}
For this demo, we will add the example w3c-ccg credential CrudeProductCredential:
Remove the VC template
/issuer-api/{tenantId}/config/templates/{templateId}
Last updated
Was this helpful?
