AAMVA Barcode Verifier
Defined under the namespace Scandit.Datacapture.Id
- AamvaBarcodeVerificationResult
class AamvaBarcodeVerificationResult
Added in version 6.17.0
The result of a verification of AAMVA-compliant personal identification document done by AamvaBarcodeVerifier.
- AamvaBarcodeVerifier
class AamvaBarcodeVerifier
Added in version 6.17.0
Validates the authenticity of the document by scanning the barcode on the back. This verifier supports documents that follow the Driver License/Identification Card specification by the American Association of Motor Vehicle Administrators (AAMVA). It requires either the full (i.e. front & back) scanning mode or a single-sided scan of the back of the document. Start with creating a capture context and the verifier:
const barcodeVerifier = await AamvaBarcodeVerifier.create(dataCaptureContext);
Then either initialize the front & back scanning mode:
const settings = new IdCaptureSettings(new FullDocumentScanner(), [new DriverLicense(Region.Any)]); const idCapture = await IdCapture.forContext(dataCaptureContext, settings);
Or initialize single-sided scanning of the back of the document:
const settings = new IdCaptureSettings( new SingleSideScanner( { barcode: true, machineReadableZone: false, visualInspectionZone: false, }, [new DriverLicense(Region.Any)] ) ); const idCapture = await IdCapture.forContext(dataCaptureContext, settings);
Once the capture is complete, trigger the verification process. This process is asynchronous and the result will be delivered once the verification has been completed:
didCaptureId: async (capturedId) => { const result = await barcodeVerifier.verify(capturedId); if (result.error) { // May happen if the license key does not permit barcode verification. } else if (result.allChecksPassed) { // Nothing suspicious was detected. } else { // Document may be fraudulent or tampered with - proceed with caution. } }
- create(context)
static create(context: DataCaptureContext): Promise<AamvaBarcodeVerifier>
Added in version 6.17.0
Creates a new instance of this verifier.
- verify(capturedId)
verify(capturedId: CapturedId): Promise<AamvaBarcodeVerificationResult>
Added in version 6.17.0
Asynchronously conduct the verification of the specified AAMVA-compliant personal identification document.