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, Loganathan S
-
-
Constructor Summary
Constructors Constructor Description OTPManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleansendOtp(OtpRequestDTO otpRequestDTO, String idvid, String idvidType, Map<String,String> valueMap, List<String> templateLanguages)Generate OTP with information ofMediaTypeand OTP generation time-out.booleanvalidateOtp(String pinValue, String otpKey, String individualId)Validate method for OTP Validation.
-
-
-
Method Detail
-
sendOtp
public boolean sendOtp(OtpRequestDTO otpRequestDTO, String idvid, String idvidType, Map<String,String> valueMap, List<String> templateLanguages) throws IdAuthenticationBusinessException
Generate OTP with information ofMediaTypeand OTP generation time-out.- Parameters:
otpRequestDTO- the otp request DTOidvid- the idvididvidType- the idvid typevalueMap- the value maptemplateLanguages- the template languages- Returns:
- String(otp)
- Throws:
IdAuthenticationBusinessException- the id authentication business exception
-
validateOtp
public boolean validateOtp(String pinValue, String otpKey, String individualId) throws IdAuthenticationBusinessException
Validate method for OTP Validation.- Parameters:
pinValue- the pin valueotpKey- the otp keyindividualId- the individual id- Returns:
- true, if successful
- Throws:
IdAuthenticationBusinessException- the id authentication business exception
-
-