Class OTPManager
- java.lang.Object
-
- io.mosip.authentication.common.service.integration.OTPManager
-
@Component public class OTPManager extends Object
OTPManager handling with OTP-Generation and OTP-Validation.- Author:
- Rakesh Roshan, Dinesh Karuppiah.T, Manoj SP
-
-
Constructor Summary
Constructors Constructor Description OTPManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
sendOtp(OtpRequestDTO otpRequestDTO, String idvid, String idvidType, Map<String,String> valueMap)
Generate OTP with information ofMediaType
and OTP generation time-out.boolean
validateOtp(String pinValue, String otpKey)
Validate method for OTP Validation.
-
-
-
Method Detail
-
sendOtp
public boolean sendOtp(OtpRequestDTO otpRequestDTO, String idvid, String idvidType, Map<String,String> valueMap) throws IdAuthenticationBusinessException
Generate OTP with information ofMediaType
and OTP generation time-out.- Parameters:
otpRequestDTO
- the otp request DTOuin
- the uinvalueMap
- the value map- Returns:
- String(otp)
- Throws:
IdAuthenticationBusinessException
- the id authentication business exception
-
validateOtp
public boolean validateOtp(String pinValue, String otpKey) throws IdAuthenticationBusinessException
Validate method for OTP Validation.- Parameters:
pinValue
- the pin valueotpKey
- the otp key- Returns:
- true, if successful
- Throws:
IdAuthenticationBusinessException
- the id authentication business exception
-
-