AAMVA Cloud Verifier
Defined under the namespace Scandit.Datacapture.Id
- AamvaCloudVerificationResult
class AamvaCloudVerificationResult
Added in version 6.15.0
The result of a verification of AAMVA-compliant personal identification document done by AamvaCloudVerifier.
- AamvaCloudVerifier
class AamvaCloudVerifier
Added in version 6.15.0
The verifier that sends data to a Scandit’s server to check the authenticity of an AAMVA-compliant personal identification document.
First, ensure that your Scandit Data Capture SDK license key supports cloud verification. Then, create an instance of AamvaCloudVerifier:
const dataCaptureContext = DataCaptureContext.forLicenseKey("-- ENTER YOUR SCANDIT LICENSE KEY HERE --") const cloudVerifier = await AamvaCloudVerifier.create(dataCaptureContext)
This kind of verification uses only data encoded in the barcode on the back side of the document. Therefore, you may capture both sides of the document, like in the previous example, or you may limit the capture just to the barcode.
Depending on the approach you choose initialize the mode with the following settings for the front & back:
const settings = new IdCaptureSettings() settings.supportedDocuments = [IdDocumentType.DLVIZ] settings.supportedSides = SupportedSides.FrontAndBack const idCapture = IdCapture.forContext(dataCaptureContext, settings)
Or for the barcode only:
const settings = new IdCaptureSettings() settings.supportedDocuments = [IdDocumentType.DLVIZ] const idCapture = IdCapture.forContext(dataCaptureContext, settings)
Once the barcode is captured, trigger the verification process. The process is asynchronous and the result will be delivered once our server verifies the received data:
const idCaptureListener = { didCaptureId: (_, session) => { const capturedId = session.newlyCapturedId const barcode = capturedId.aamvaBarcodeResult if (barcode) { cloudVerifier .then(verifierInstance => { verifierInstance .verify(session.newlyCapturedId) .then(result => { if (result.allChecksPassed) { // Nothing suspicious was detected. } else { // Document may be fraudulent or tampered with - proceed with caution. } }, (error) => { // Unable to reach the server - most probably the device has no internet connection. } }) }) } } }
- create(context)
static create(context: DataCaptureContext): Promise<AamvaCloudVerifier>
Added in version 6.15.0
Creates a new instance of this verifier.
- verify(capturedId)
verify(capturedId: CapturedId): Promise<AamvaCloudVerificationResult>
Added in version 6.15.0
Connect to asynchronously to the server and conduct the verification of the specified AAMVA-compliant personal identification document.