/// <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!"); } }
/// <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!"); } }
/// <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!"); } }
/// <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!"); } }