Credential Verification

Validate Verifiable Credentials using Verification Service.

Supported Languages

Package: @affinidi-tdk/credential-verification-client

npm install @affinidi-tdk/credential-verification-client --save

Package: affinidi_tdk_credential_verification_client

pip install affinidi_tdk_credential_verification_client

Classes and Methods

Default API

Verify Verifiable Credentials and Verifiable Presentations.

verifyCredentials

Generate and issue a credentil offer to the user.

Parameters

VerifyCredentialInput [Object]

JSON object to provide the Verifiable Credentials to validate.

Example
const api = new DefaultApi(authConfiguration)

const request: VerifyCredentialInput = {
        'verifiableCredentials': [
            {
                ...
            }
        ],
        'issuerDidDocument': {
            'additionalProp1': 'string'
        }
    }

const { data } = await api.verifyCredentials(request)
with affinidi_tdk_credential_verification_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_credential_verification_client.DefaultApi(api_client)

    request_json = "{
        'verifiableCredentials': [
            {
                ...
            }
        ],
        'issuerDidDocument': {
            'additionalProp1': 'string'
        }
    }"

    verify_credentials_input = affinidi_tdk_iam_client.VerifyCredentialInput.from_json(request_json)

    api_response = api_instance.verify_credentials(verify_credentials_input=verify_credentials_input)

verifyPresentation

Generate and issue a credentil offer to the user.

Parameters

VerifyPresentationInput [Object]

JSON object to provide the Verifiable Presentation to validate.

Example
const api = new DefaultApi(authConfiguration)

const request: VerifyPresentationInput = {
        'verifiablePresentation': {...},
        'signedPresentation': {...},
        'presentationDefinition': {...},
        'presentationSubmission': {...},
        'challenge': 'string'
    }

const { data } = await api.verifyPresentation(projectId, request)
with affinidi_tdk_credential_verification_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_credential_verification_client.DefaultApi(api_client)

    request_json = "{
            'verifiablePresentation': {...},
            'signedPresentation': {...},
            'presentationDefinition': {...},
            'presentationSubmission': {...},
            'challenge': 'string'
        }"

    verify_presentation_input = affinidi_tdk_iam_client.VerifyPresentationInput.from_json(request_json)

    api_response = api_instance.verify_presentation(projectId, verify_presentation_input=verify_presentation_input)