Class FaceController

java.lang.Object
com.markvarga21.studentmanager.controller.FaceController

@RestController @RequestMapping("/api/v1/faces") @CrossOrigin public class FaceController extends Object
A controller which is used to make Face related operations.
  • Constructor Details

    • FaceController

      public FaceController()
  • Method Details

    • getSelfieValidationData

      @PostMapping("/validate") @PreAuthorize("hasRole(\'ROLE_ADMIN\')") public org.springframework.http.ResponseEntity<FaceApiResponse> getSelfieValidationData(@RequestParam("passport") org.springframework.web.multipart.MultipartFile passport, @RequestParam("selfiePhoto") org.springframework.web.multipart.MultipartFile selfiePhoto)
      Compares the faces found on the passport and the uploaded selfie, which is then sent back to the client.
      Parameters:
      passport - The student's passport.
      selfiePhoto - The selfie of the student.
      Returns:
      The validity- and the percentage of the faces matching.