Interface FaceApiService

All Known Implementing Classes:
FaceApiServiceImpl

public interface FaceApiService
An interface for validating and comparing the faces on the passport and the selfie itself.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deleteFace(String passportNumber)
    Deletes the face with the given passport number.
    getFaceIdForFile(org.springframework.web.multipart.MultipartFile file)
    Returns the face ID for the given file.
    getValidityOfFaces(org.springframework.web.multipart.MultipartFile passport, org.springframework.web.multipart.MultipartFile selfiePhoto)
    Compares the faces found on the passport and the selfie, and then sends it back to the client.
    boolean
    validateFacesForPassportNumber(String passportNumber, Long studentId)
    Validates the faces for the given passport number.
  • Method Details

    • getValidityOfFaces

      FaceApiResponse getValidityOfFaces(org.springframework.web.multipart.MultipartFile passport, org.springframework.web.multipart.MultipartFile selfiePhoto)
      Compares the faces found on the passport and the selfie, and then sends it back to the client.
      Parameters:
      passport - The student's passport image.
      selfiePhoto - The selfie image of the student.
      Returns:
      The validity and the percentage of the matching.
    • getFaceIdForFile

      String getFaceIdForFile(org.springframework.web.multipart.MultipartFile file)
      Returns the face ID for the given file.
      Parameters:
      file - The file to get the face ID for.
      Returns:
      The face ID for the given file.
    • validateFacesForPassportNumber

      boolean validateFacesForPassportNumber(String passportNumber, Long studentId)
      Validates the faces for the given passport number.
      Parameters:
      studentId - The id of the student.
      passportNumber - The passport number.
      Returns:
      true if the faces are valid, false otherwise.
    • deleteFace

      void deleteFace(String passportNumber)
      Deletes the face with the given passport number.
      Parameters:
      passportNumber - The passport number.