How to Verify and Use the Credential
Verifiable Credential is a sealed object. After a credential is created, it is protected by the issuer’s signature - it cannot be modified (all modifications will destroy its integrity). Before using the credential, the validity needs to be verified. The information contained in the credential can only be used on the premise of its validity.
Credential Authentication
The credential can be verified from the following three aspects:
Expiration
A credential has an effective period when it is created, which is recorded in the corresponding Verifiable Credential object. Only when the credential is within the effective period can it be a valid identity. For any credential, you can verify whether it is in the effective period by the following methods:
Revoked
The credential can be revoked, meaning it cannot be used and accepted by third parties. You can test whether the credential has been revoked by using the following methods:
See publishing credential for how to revoke credential.
Genuine
After obtaining a credential object, it's also necessary to test whether the document has been maliciously modified. The test method is as follows:
In daily use, to verify the validity of a credential, it's necessary to verify the above three aspects in order to know the accurate result. The DID SDK provides a composite method isValid (), which contains all the verifications. For example:
Credential Information Reading
Verifiable Credential provides a series of methods to read the information of credentials. For example:
Last updated