Credential Verification
Validate Verifiable Credentials using Verification Service.
Install Dependency
Package: affinidi_tdk_credential_verification_client
pip install affinidi_tdk_credential_verification_client
You can check the latest version of this module on the PyPi repository or view the source code at the GitHub repository.
Classes and Methods
Default API
Verify Verifiable Credentials and Verifiable Presentations.
verify_credentials
Generate and issue a credentil offer to the user.
Parameters
VerifyCredentialInput [Object]
JSON object to provide the Verifiable Credentials to validate.
Example
import affinidi_tdk_credential_verification_client
configuration = affinidi_tdk_credential_verification_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken
with affinidi_tdk_credential_verification_client.ApiClient(configuration) as api_client:
api_instance = affinidi_tdk_credential_verification_client.DefaultApi(api_client)
request_json = {
"verifiableCredentials": [
{
...
}
]
}
verify_credentials_input = affinidi_tdk_credential_verification_client.VerifyCredentialInput.from_dict(request_json)
api_response = api_instance.verify_credentials(verify_credentials_input=verify_credentials_input)
verify_presentation
Generate and issue a credentil offer to the user.
Parameters
VerifyPresentationInput [Object]
JSON object to provide the Verifiable Presentation to validate.
Example
import affinidi_tdk_credential_verification_client
configuration = affinidi_tdk_credential_verification_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken
with affinidi_tdk_credential_verification_client.ApiClient(configuration) as api_client:
api_instance = affinidi_tdk_credential_verification_client.DefaultApi(api_client)
request_json = {
"verifiablePresentation": {...}
}
verify_presentation_input = affinidi_tdk_credential_verification_client.VerifyPresentationInput.from_dict(request_json)
api_response = api_instance.verify_presentation(projectId, verify_presentation_input=verify_presentation_input)
Was this page helpful?
Glad to hear it! Please tell us how we can improve more.
Sorry to hear that. Please tell us how we can improve.
Thank you for sharing your feedback so we can improve your experience.