Class OtpGeneratorController
- java.lang.Object
-
- io.mosip.kernel.otpmanager.controller.OtpGeneratorController
-
@RestController public class OtpGeneratorController extends Object
This class provides controller methods for OTP generation.- Since:
- 1.0.0
- Author:
- Sagar Mahapatra, Ritesh Sinha
-
-
Constructor Summary
Constructors Constructor Description OtpGeneratorController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.mosip.kernel.core.http.ResponseWrapper<OtpGeneratorResponseDto>generateOtp(io.mosip.kernel.core.http.RequestWrapper<OtpGeneratorRequestDto> otpDto)This method handles the OTP generation.
-
-
-
Method Detail
-
generateOtp
@ResponseFilter @PreAuthorize("hasAnyRole(@authorizedRoles.getPostotpgenerate())") @PostMapping("/otp/generate") public io.mosip.kernel.core.http.ResponseWrapper<OtpGeneratorResponseDto> generateOtp(@Validated(ValidationLevel.class) @RequestBody io.mosip.kernel.core.http.RequestWrapper<OtpGeneratorRequestDto> otpDto)This method handles the OTP generation.- Parameters:
otpDto- The request DTO for OTP generation.- Returns:
- The generated OTP as DTO response.
-
-