Skip to main content
Version: 13.x (Current)

Overview

Verifiable credential is an open standard for digital credentials and can be used to represent personal information; this kind of documents are usually generated during the final step of an identification process.

This template can be used as a starting point to implement a microservice for the verifiable credential generation, and can be used within the identification manager application.

The verifiable credential generated is then returned as a JWT.

info

This service communicates via REST by default, but it can also rely on KAFKA if the environment variable MODE is set to KAFKA.

Endpoint

The endpoint exposed is designed to be compatible with REST flow manager service, that means that responses are asynchronous.

POST /generate

The service generate the verifiable credential based on a static schema and the input data.

The following events can be used in the response:

  • verifiableCredentialGenerated
  • verifiableCredentialGenerationFailed

Input body:

{
"key": "{{mainFlowId}}",
"value": {
"messageLabel": "generateVerifiableCredential",
"messagePayload": {
// define what you need
}
}
}

Response

{
"key": "{{mainFlowId}}",
"value": {
"messageLabel": "verifiableCredentialGenerated",
"messagePayload": {
"verifiableCredential": "{{verifiableCredentialGenerated}}"
}
}
}

Errors

If an error occurs the following event will be sent:

{
"key": "{{mainFlowId}}",
"value": {
"messageLabel": "verifiableCredentialGenerationFailed",
"messagePayload": {
"verifiableCredentialError": "error message"
}
}
}