IDScan.net
Search Results for

    Show / Hide Table of Contents

    ValidationService

    Customer authentication service

    Methods

    Execute

    Start customer authentication process

    Request message

    ValidationStartRequest

    type name description
    bool frameInstruction Allow receiving video instructions
    bool frameRaw Allow receiving raw video frames and events
    bool eventScan Allow receiving scans received during ID and face processing
    bool eventTestResult Allow receiving intermediate results of customer authentication tests
    bool sendResultData Allow receiving personally identifiable information
    PresetType preset Set of tests to run

    preset values

    • ValidationStartRequest.PresetType.DEFAULT - Default
    • ValidationStartRequest.PresetType.PRESET1 - ID + FaceMatching + RealFace1 + RealFace2
    • ValidationStartRequest.PresetType.PRESET2 - ID + FaceMatching + RealFace1
    • ValidationStartRequest.PresetType.PRESET3 - ID + FaceMatching
    • ValidationStartRequest.PresetType.PRESET4 - ID

    Response message

    ValidationStartResponse.Context - Context of the customer authentication process

    ValidationStartResponse.Error - Message with error text |type|name|description| |---|---|---| |string | message | Error text |

    SubscribeFrames

    Subscribe to video frames of the customer authentication process

    Request message

    ValidationContext - Context of the customer authentication process received as a result of executing the Execute method.

    Response message

    Frame.executionResult - The result of the customer authentication process

    type name description
    StatusType status The status of the result of the customer authentication process
    string data customer info parsed from ID. JSON format

    Frame.instruction - Video frame with instructions for going through the customer authentication process

    type name description
    bytes image Video Frame. JPeg format.

    Frame.raw - Video frame received from camera.

    type name description
    bytes image Video Frame. JPeg format.
    string phaseCode Code of the phase of the Customer Authentication Process

    SubscribeEvents

    Subscribe to events of the customer authentication process

    Request message

    ValidationContext - Context of the customer authentication process received as a result of executing the Execute method.

    Response message

    Event.executionResult - The result of the customer authentication process

    type name description
    StatusType status The status of the result of the customer authentication process
    string data customer info parsed from ID. JSON format

    Event.PhaseStatus - Statuses of the customer authentication process

    type name description
    string phaseCode Code of the phase of the customer Authentication Process
    string 'state' State of the phase of the customer Authentication Process
    int32 'elapsed' Elapsed time since the beginning of the phase

    Event.Scan - Scans received during ID and face processing

    type name description
    string code Scan code
    bytes image Image. JPeg format.

    Possible scan codes:

    • Color-FrontSide
    • Color-BackSide
    • IR-FrontSide
    • IR-BackSide
    • UV-FrontSide
    • UV-BackSide
    • Face-Document
    • Face-Camera

    Event.TestResult - Intermediate results of customer authentication tests |type|name|description| |---|---|---| |string | name || |string | description || |string | status || |int32 | statusCode | Code of test status.|

    Possible codes of status:

    • 0 - Failed
    • 1 - Passed

    Example

    function validationStart() {
        let req = new ValidationStartRequest();
        req.setPreset(ValidationStartRequest.PresetType.DEFAULT);
        req.setFrameinstruction(true);
    
        grpc.invoke(ValidationService.Execute, {
            request: req,
            host: 'http://localhost:5000',
            onMessage: (msg) => {
                if (msg.getContext() != null) {
                    subscribe(msg.getContext());
                }
                if (msg.getError() != null) {
                    let errorMsg = msg.getError().getMessage();
                    // Error handling
                    document.getElementById('results').innerHTML += '<li><span>FAIL (' + errorMsg + ')</span></li>';
                }
            }
        });
    }
    
    function subscribe(context) {
        var stream1 = grpc.invoke(ValidationService.SubscribeFrames, {
            request: context,
            host: 'http://localhost:5000',
            onMessage: (msg) => {
                if (msg.getExecutionresult() != null) {
                    // Handle result of the customer authentication process
                    handleExecutionResult(msg.getExecutionresult());
                    stream1.close();
                }
                if (msg.getInstruction() != null) {
                    // Handle video frame
                    handleFrameInstruction(msg.getInstruction());
                }
            }
        });
    }
    
    
    Back to top IDScan.net IDScan.net GitHub