Verifies if the provided OTP matches the one stored in the DB.
Syntax
boolean
verifyCustomerOtp
(
String
otp
,
long
customerId
,
int
otpType
,
long
referenceId
,
long
callerId
) throws OtpValidationException
Parameters
-
otp –
the OTP to validate
-
customerId –
the customer Id for whom to validate hte OTP
-
otpType –
the type of OTP to validate
-
referenceId –
the reference Id as provided when the OTP was created
-
callerId –
the ID of the caller of the operation. Used for tracking/audit purposes.
Returns
true when the otp matched, false when the otp did not match.
Exceptions
-
OtpValidationException –
is thrown if no OTP was found in the DB, the OTP in the DB has expired, the threshold of failed verifications has been exceeded.
Usage
In case the OTP in the DB already expired, was not found, or the threshold of failed verifications has been exceeded an
OtpValidationException
is thrown.
true when the otp matched, false when the otp did not match.