Configuring Verifiable Credentials with API
Verifiable Credential Stakeholder entities allow the Wallet keep a list of known Issuers and Verifiers that are part of the ecosystem.
These entities may be configured through the Wallet Admin API. For more information about using this API, see the chapter on configuring the Wallet Server, here.
The cloud_agent_connection data table references these entities in order to keep track of what party the connections connect to.
info
In the current version of Verifiable Credentials for the FPX Wallet, connections may only be created with known stakeholders.
Request Attributes
Parameter | Description | Suggested value | Required | Localizable |
---|---|---|---|---|
name | The human-readable name to be used for the stakeholder in a user interface. | Test Stakeholder | No | Yes |
identifier | A unique identifier which is used to reference this stakeholder in requests to the Wallet. | identos-test-aries-stakeholder | Yes | No |
did | The decentralized identifier the stakeholder is known as on the ledger. | did:sov:7JBZSebNehR2UfwyXsYaw2 | Yes | No |
serviceUrl | A URL which may also appear in a connection invitation created by this stakeholder. | null | No | No |
logoUrl | A link to a logo image for this stakeholder, to be displayed on Wallet UIs. | https://identos.com/wp-content/uploads/2020/08/home-industries-government.svg | Yes | Yes |
styleColor | Preferred colour styling for when this stakeholder makes an appearance in a user interface. | #FFFFFF | Yes | No |
styleFontColor | Preferred colour styling for when this stakeholder makes an appearance in a user interface. | #000000 | Yes | No |
isIssuer | Boolean denoting whether this stakeholder is an issuer. At least one of isIssuer or isVerifier should be set to true. | true | No | No |
isVerifier | Boolean denoting whether this stakeholder is a verifier. At least one of isIssuer or isVerifier should be set to true. | true | No | No |
Sample Requests
Create a Verifiable Credential Stakeholder
curl -X POST '{{WS_ADMIN_URI}}/verifiable-credential-stakeholder' \
--header 'Content-Type: application/vnd.api+json' \
--header 'ApiVersion: v1.0' \
--header 'Authorization: {{WS_ADMIN_STATIC_TOKEN}}' \
--header 'Accept-Language: en' \
--data-raw '{
"data": {
"type": "verifiable-credential-stakeholder",
"id": 1,
"attributes": {
"name": "Test Stakeholder",
"identifier": "identos-test-aries-stakeholder",
"did": "did:sov:7JBZSebNehR2UfwyXsYaw1",
"serviceUrl": null,
"logoUrl": "https://identos.com/wp-content/uploads/2020/08/home-industries-government.svg",
"styleColor": "#FFFFFF",
"styleFontColor": "#000000"
"isIssuer": true,
"isVerifier": true,
}
}
}'
Get information about existing Verifiable Credential Stakeholders
curl -X GET '{{WS_ADMIN_URI}}/verifiable-credential-stakeholder' \
--header 'Content-Type: application/vnd.api+json' \
--header 'ApiVersion: v1.0' \
--header 'Authorization: {{WS_ADMIN_STATIC_TOKEN}}' \
--header 'Accept-Language: en' \
Update a Verifiable Credential Stakeholder
curl -X PATCH '{{WS_ADMIN_URI}}/verifiable-credential-stakeholder/1' \
--header 'Content-Type: application/vnd.api+json' \
--header 'ApiVersion: v1.0' \
--header 'Authorization: {{WS_ADMIN_STATIC_TOKEN}}' \
--header 'Accept-Language: en' \
--data-raw '{
"data": {
"type": "verifiable-credential-stakeholder",
"id": 1,
"attributes": {
"name": "Test Stakeholder 2",
"identifier": "identos-test-aries-stakeholder2",
"did": "did:sov:7JBZSebNehR2UfwyXsYaw2",
"serviceUrl": "http://localhost",
"logoUrl": "https://identos.com/wp-content/uploads/2020/08/home-industries-government.svg",
"styleColor": "#C5DFFF",
"styleFontColor": "#000000"
"isIssuer": true,
"isVerifier": true,
}
}
}'