Verifications
Introduction
Verifications allow you to request data from a digital wallet. They are a core part of SSI. A unique value proposition of verifiable credentials is that information can be verified instantly and cryptographically, without managing multiple integrations.
Verification of credentials follows a specific protocol.
- The verifier must first understand their risk policy. What will they accept? How will they know whether to trust the verification? These policies are known as "Verification Policies".
- The verifier must first request some information from the credential holder. This request is known as a "proof request" or "verification request".
- The holder will then decide whether/how to satisfy the request and send a response back to the verifier. They won't share the actual credentials but will simply share proof of the credentials. The response is known as a "proof presentation" or simply a "proof".
- Once the verifier receives the proof from the holder, they will check the digital signatures, content, and revocation status against the blockchain to ensure validity.
Feel free to reach out to our team at [email protected] if you'd like to understand more about these policies.
Create a Verification PolicyPOST /verificationPolicies
A Verification Policy is created and saved on your cloud agent.
- JSON
- Javascript
- Studio
List all Verification PoliciesGET /verificationPolicies
This will list all of the Verification Policies that you have created with your organization.
Get the specified Verification PolicyGET /verificationPolicies/{policyId}
Use the Verification Policy ID to get a specific Verification Policy.
List all verifications for a connectionGET /verifications
Now that you have created a Verification Policy, you can use that policy to request verification of credentials from other agents.
Use the Verification Policy ID to get a specific Verification Policy.
Create a Verification
There are currently four ways to create and send a verification request.
1. Send a verification to the specified connection from existing Verification PolicyPUT /verifications/policy/{policyId}/connections/{connectionId}
This endpoint can be used to send a Verification Policy to a connection, which will create a verification ID to track the response from the connection.
- Javascript
- Studio
2. Create a verification from existing policy used for connectionless transportPUT /verifications/policy/{policyId}
This endpoint can be used to create a Verification Policy from an existing Verification Policy and respond with a verificationUrl that can be sent to users.
3. Create a verification from parameters used for connectionless transportPOST /verifications/policy
This endpoint can be used to create a Verification Policy and respond with a verificationUrl that can be sent to users.
4. Send a verification to the specified connection from parametersPUT /verifications/policy/connections/{connectionId}
This endpoint can be used to create a Verification Policy and respond with a verificationUrl that can be sent to users.
Create a Connectionless VerificationPUT /verifications/policy/{policyId}
This endpoint can be used to create a verification from existing policy used for connectionless transport.
- Javascript
- Studio
Get verification by identifierGET /verifications/{verificationId}
This endpoint should be used to get each verification by its identifier.
See above for description of attributes.
Execute Verification for LedgerGET /verifications/{verificationId}/verify
Verify the proof against the ledger.
Additional Information
Explanation of Restrictions List
In the verification template, the restrictions
list defines where this data is allowed to come from. The three most useful options include:
schemaId
: Anyone who creates a credential with a certain schema ID can issue it to an individual. The schema ID only provides trust that the data is in the correct format.credentialDefinitionId
: Because a Credential Definition is signed by an issuer, the Credential Definition defines both the format of the data and also who sent it to the wallet. This is the most commonly used restriction when contructing definitions. The Credential Definition would be an ID that is written to the Sovrin Ledger, and will prove that the credential an agent sends to you is both issued by the organization and is in the format that you need.issuerDid
: For situations where you only care about where the credential is from and not what format the data is in, you may also use only the issuer's DID. This is also resolvable on the Sovrin Network and will prove that the data you have received was sent from a trusted source. It will not provide any information around the format of the data that you're receiving.
When sending a Verification, you may choose to request an Attribute Policy or a Predicate Policy. The attribute proofs will reveal the actual data of each attribute you request. The Predicate proofs will only return a True
or False
value on whether the attribute matches your specified query. For example, if someone's Date of Birth
is before 1998, you may request that the person provide their Year of Birth
attribute, and only from the Driver's License
or Passport
credentials issued by the US Government
:
This will return either a true
or false
value to the attribute that a user supplies. If the value's signature matches the signatures stored in the Credential Definition, it will return true. This value can be trusted to have come from whichever Credential Definition ID has been specified, which can only be created by a unique issuer on the sovrin network.
Predicate Proofs
Predicate proofs have four possible types: >=
, >
, <=
, and <
. The name must match the attribute name exactly, both in spelling and in capitalization in order to be recognized.