/// <summary> /// Is Registered /// </summary> /// <param name="id"></param> private static void IsRegister(string id) { CloudABISBiometricRequest biometricRequest = new CloudABISBiometricRequest { RegistrationID = id, CustomerKey = _cloudABISAPICredentials.CustomerKey, EngineName = CloudABISConstant.FINGERPRINT_ENGINE, Token = _cloudABISToken.AccessToken }; //IsRegistered CloudABISResponse matchingResponse = _cloudABISAPI.IsRegistered(biometricRequest); if (matchingResponse != null) { if (matchingResponse.Status.Equals(EnumOperationStatus.SUCCESS)) { Console.WriteLine("IsRegistered: " + matchingResponse.OperationResult); } else { Console.WriteLine("IsRegistered: " + matchingResponse.OperationResult); } } else { Console.WriteLine("Something went wrong!"); } }
/// <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!"); } }
private static void Register(CloudABISScanrCaptureResponse cloudScanrCaptureResponse, string id) { CloudABISBiometricRequest biometricRequest = new CloudABISBiometricRequest { RegistrationID = id, BiometricXml = cloudScanrCaptureResponse.TemplateData, CustomerKey = _cloudABISAPICredentials.CustomerKey, EngineName = CloudABISConstant.FINGERPRINT_ENGINE, Format = CloudABISConstant.CLOUDABIS_ISO, Token = _cloudABISToken.AccessToken }; //Register Biometric CloudABISResponse matchingResponse = _cloudABISAPI.Register(biometricRequest); if (matchingResponse != null) { if (matchingResponse.Status.Equals(EnumOperationStatus.SUCCESS)) { if (matchingResponse.OperationResult.Equals(CloudABISConstant.MATCH_FOUND)) { Console.WriteLine(CloudABISConstant.MATCH_FOUND + ":" + matchingResponse.BestResult.ID); } else { Console.WriteLine("IdentifyResult:" + matchingResponse.OperationResult); } } else { Console.WriteLine("IdentifyResult: " + matchingResponse.OperationResult); } } else { Console.WriteLine("Something went wrong!"); } }