Class OtpValidatorController


  • @RestController
    public class OtpValidatorController
    extends Object
    This class provides controller methods for OTP validation.
    Since:
    1.0.0
    Author:
    Sagar Mahapatra
    • Constructor Detail

      • OtpValidatorController

        public OtpValidatorController()
    • Method Detail

      • validateOtp

        @ResponseFilter
        @PreAuthorize("hasAnyRole(@authorizedRoles.getGetotpvalidate())")
        @GetMapping("/otp/validate")
        public io.mosip.kernel.core.http.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.