Class OtpValidatorController
- java.lang.Object
-
- io.mosip.kernel.otpmanager.controller.OtpValidatorController
-
@RestController @CrossOrigin public class OtpValidatorController extends Object
This class provides controller methods for OTP validation.- Since:
- 1.0.0
- Author:
- Sagar Mahapatra
-
-
Constructor Summary
Constructors Constructor Description OtpValidatorController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseWrapper<OtpValidatorResponseDto>validateOtp(String key, String otp)This method validates the OTP against a key.
-
-
-
Method Detail
-
validateOtp
@PreAuthorize("hasAnyRole(\'INDIVIDUAL\',\'REGISTRATION_ADMIN\',\'REGISTRATION_SUPERVISOR\',\'REGISTRATION_OFFICER\',\'ID_AUTHENTICATION\',\'AUTH\',\'RESIDENT\')") @ResponseFilter @GetMapping("/otp/validate") public ResponseWrapper<OtpValidatorResponseDto> validateOtp(@RequestParam String key, @RequestParam String otp)This method validates the OTP against a key.- Parameters:
key- the key against which the OTP needs to be validated.otp- the OTP to be validated.- Returns:
- the validation status as DTO response.
-
-