adding email otp verification
This commit is contained in:
@@ -1,17 +1,24 @@
|
||||
package zw.qantra.tm.domain.controllers;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import zw.qantra.tm.domain.services.EmailService;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/test")
|
||||
@CrossOrigin(origins = "*")
|
||||
public class TestController {
|
||||
@Autowired
|
||||
private EmailService emailService;
|
||||
|
||||
@GetMapping("/hello/{email}")
|
||||
public ResponseEntity<String> helloEndpoint(@PathVariable String email) {
|
||||
emailService.sendSimpleMessage(email, "Hello", "Hello World!");
|
||||
return ResponseEntity.ok("Hello World!");
|
||||
}
|
||||
|
||||
@GetMapping("/protected")
|
||||
public ResponseEntity<String> protectedEndpoint() {
|
||||
|
||||
Reference in New Issue
Block a user