示例#1
0
        /// <summary>
        /// Identify biometric
        /// </summary>
        /// <param name="template">Templte or image</param>
        /// <param name="token"></param>
        /// <param name="format">Format value needs only for FingerPrint operation</param>
        public string Identify(string template, string token, string format = CloudABISConstant.CLOUDABIS_ISO)
        {
            CloudABISBiometricRequest biometricRequest = new CloudABISBiometricRequest
            {
                BiometricXml = template,
                CustomerKey  = _customerKey,
                EngineName   = _engineName,
                Format       = format,
                Token        = token
            };
            CloudABISAPI      cloudABISAPI     = new CloudABISAPI(_appkey, _secretKey, _apiBaseUrl);
            CloudABISResponse matchingResponse = cloudABISAPI.Identify(biometricRequest);

            if (matchingResponse != null)
            {
                if (matchingResponse.OperationName.Equals(EnumOperationName.Identify) && matchingResponse.OperationResult.Equals(CloudABISConstant.MATCH_FOUND))
                {
                    return(CloudABISResponseParser.GetResponseMessage(matchingResponse.OperationResult) + ": " + matchingResponse.BestResult.ID);
                }
                else
                {
                    return(CloudABISResponseParser.GetResponseMessage(matchingResponse.OperationResult));
                }
            }
            else
            {
                return("Something went wrong!");
            }
        }
示例#2
0
        /// <summary>
        /// Update existing employee/person biometric data
        /// </summary>
        /// <param name="template">Templte or image</param>
        /// <param name="registrationid"></param>
        /// <param name="token"></param>
        /// <param name="format">Format value needs only for FingerPrint operation</param>
        public string Update(string template, string registrationid, string token, string format = CloudABISConstant.CLOUDABIS_ISO)
        {
            CloudABISBiometricRequest biometricRequest = new CloudABISBiometricRequest
            {
                RegistrationID = registrationid,
                BiometricXml   = template,
                CustomerKey    = _customerKey,
                EngineName     = _engineName,
                Format         = format,
                Token          = token
            };
            CloudABISAPI      cloudABISAPI     = new CloudABISAPI(_appkey, _secretKey, _apiBaseUrl);
            CloudABISResponse matchingResponse = cloudABISAPI.Update(biometricRequest);

            if (matchingResponse != null)
            {
                if (matchingResponse.OperationName.Equals(EnumOperationName.Register) && matchingResponse.OperationResult.Equals(CloudABISConstant.SUCCESS))
                {
                    return("Update Biometric Success!");
                }
                else
                {
                    return(CloudABISResponseParser.GetResponseMessage(matchingResponse.OperationResult));
                }
            }
            else
            {
                return("Something went wrong!");
            }
        }
示例#3
0
        /// <summary>
        /// Is Registered
        /// </summary>
        /// <param name="id"></param>
        /// <param name="token"></param>
        /// <returns></returns>
        public string IsRegister(string id, string token)
        {
            CloudABISBiometricRequest biometricRequest = new CloudABISBiometricRequest
            {
                RegistrationID = id,
                CustomerKey    = _customerKey,
                EngineName     = _engineName,
                Token          = token
            };
            CloudABISAPI      cloudABISAPI     = new CloudABISAPI(_appkey, _secretKey, _apiBaseUrl);
            CloudABISResponse matchingResponse = cloudABISAPI.IsRegistered(biometricRequest);

            if (matchingResponse != null)
            {
                return(CloudABISResponseParser.GetResponseMessage(matchingResponse.OperationResult));
            }
            else
            {
                return("Something went wrong!");
            }
        }
示例#4
0
        /// <summary>
        /// Verify existing employee/person biometric data
        /// </summary>
        /// <param name="template">Templte or image</param>
        /// <param name="verifyID"></param>
        /// <param name="token"></param>
        /// <param name="format">Format value needs only for FingerPrint operation</param>
        public string Verify(string template, string verifyID, string token, string format = CloudABISConstant.CLOUDABIS_ISO)
        {
            CloudABISBiometricRequest biometricRequest = new CloudABISBiometricRequest
            {
                RegistrationID = verifyID,
                BiometricXml   = template,
                CustomerKey    = _customerKey,
                EngineName     = _engineName,
                Format         = format,
                Token          = token
            };
            CloudABISAPI      cloudABISAPI     = new CloudABISAPI(_appkey, _secretKey, _apiBaseUrl);
            CloudABISResponse matchingResponse = cloudABISAPI.Verify(biometricRequest);

            if (matchingResponse != null)
            {
                return(CloudABISResponseParser.GetResponseMessage(matchingResponse.OperationResult));
            }
            else
            {
                return("Something went wrong!");
            }
        }