| | |
| | | @Autowired |
| | | TokenProvider tokenProvider; |
| | | |
| | | @GetMapping("/bySMS") |
| | | public ResponseEntity<OtpResponseDTO> sendOtpBySMS(@RequestParam("phone") String phone) { |
| | | final OtpResponseDTO otpResponseDTO = otpWebService.sendByPhone(phone); |
| | | return new ResponseEntity<>(otpResponseDTO, HttpStatus.OK); |
| | | } |
| | | |
| | | @GetMapping("/byEmail") |
| | | public ResponseEntity<OtpResponseDTO> sendOtpByEmail(@RequestParam("email") String email) { |
| | | final OtpResponseDTO otpResponseDTO = otpWebService.sendByEmail(email); |
| | | return new ResponseEntity<>(otpResponseDTO, HttpStatus.OK); |
| | | } |
| | | |
| | | @GetMapping("/verifyOtp") |
| | | public ResponseEntity<OtpResponseDTO> verifyOtp(@RequestParam("account") String account, @RequestParam("indexKey") String indexKey, @RequestParam("otpCode") String otpCode) { |
| | | final OtpResponseDTO otpResponseDTO = otpWebService.verifyOTP(indexKey, otpCode); |
| | | return new ResponseEntity<>(otpResponseDTO, HttpStatus.OK); |
| | | } |
| | | // @GetMapping("/bySMS") |
| | | // public ResponseEntity<OtpResponseDTO> sendOtpBySMS(@RequestParam("phone") String phone) { |
| | | // final OtpResponseDTO otpResponseDTO = otpWebService.sendByPhone(phone); |
| | | // return new ResponseEntity<>(otpResponseDTO, HttpStatus.OK); |
| | | // } |
| | | // |
| | | // @GetMapping("/byEmail") |
| | | // public ResponseEntity<OtpResponseDTO> sendOtpByEmail(@RequestParam("email") String email) { |
| | | // final OtpResponseDTO otpResponseDTO = otpWebService.sendByEmail(email); |
| | | // return new ResponseEntity<>(otpResponseDTO, HttpStatus.OK); |
| | | // } |
| | | // |
| | | // @GetMapping("/verifyOtp") |
| | | // public ResponseEntity<OtpResponseDTO> verifyOtp(@RequestParam("account") String account, @RequestParam("indexKey") String indexKey, @RequestParam("otpCode") String otpCode) { |
| | | // final OtpResponseDTO otpResponseDTO = otpWebService.verifyOTP(indexKey, otpCode); |
| | | // return new ResponseEntity<>(otpResponseDTO, HttpStatus.OK); |
| | | // } |
| | | |
| | | // @GetMapping("/byEService") |
| | | // public ResponseEntity<EServiceResponse> loginByEService(@RequestParam("account") String account, @RequestParam("password") String password) throws Exception { |