Skip to content

Commit

Permalink
Mosip 31314 OTP manager changes (#1191)
Browse files Browse the repository at this point in the history
* MOSIP-30687 partner data changed

Signed-off-by: Neha Farheen <[email protected]>

* MOSIP-30687 partner data changed

Signed-off-by: Neha Farheen <[email protected]>

* MOSIP-30687 changes done for ondemand

Signed-off-by: Neha Farheen <[email protected]>

* MOSIP-30687 changes done  for exception

Signed-off-by: Neha Farheen <[email protected]>

* Changes in error message

Signed-off-by: Neha Farheen <[email protected]>

* Changes in error message

Signed-off-by: Neha Farheen <[email protected]>

* REmoved the error message related changes

Signed-off-by: Neha Farheen <[email protected]>

* MOSIP-31517 On demand changes error message removal

Signed-off-by: Neha Farheen <[email protected]>

* Changes done

Signed-off-by: Neha Farheen <[email protected]>

* otp controller changes

Signed-off-by: Neha Farheen <[email protected]>

* OTP repo changes

Signed-off-by: Neha Farheen <[email protected]>

* OTP repo changes

Signed-off-by: Neha Farheen <[email protected]>

* OTP manager changes done

Signed-off-by: Neha Farheen <[email protected]>

---------

Signed-off-by: Neha Farheen <[email protected]>
Co-authored-by: Neha Farheen <[email protected]>
Co-authored-by: 61092365 <61092365@DPQ7NM3>
  • Loading branch information
3 people authored Feb 9, 2024
1 parent ed170e9 commit 9f780d3
Showing 1 changed file with 12 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,26 +118,18 @@ public boolean sendOtp(OtpRequestDTO otpRequestDTO, String idvid, String idvidTy
+ EnvUtil.getKeySplitter() + otpRequestDTO.getTransactionID()
+ EnvUtil.getKeySplitter() + otp).getBytes());

OtpTransaction otpTxn;
if (otpEntityOpt.isPresent()
&& (otpTxn = otpEntityOpt.get()).getStatusCode().equals(IdAuthCommonConstants.ACTIVE_STATUS)) {
otpTxn.setOtpHash(otpHash);
otpTxn.setUpdBy(securityManager.getUser());
otpTxn.setUpdDTimes(otpGenerationTime);
otpTxn.setExpiryDtimes(otpGenerationTime.plusSeconds(EnvUtil.getOtpExpiryTime()));
otpRepo.save(otpTxn);
} else {
OtpTransaction txn = new OtpTransaction();
txn.setId(UUID.randomUUID().toString());
txn.setRefId(securityManager.hash(otpRequestDTO.getIndividualId()));
txn.setOtpHash(otpHash);
txn.setCrBy(securityManager.getUser());
txn.setCrDtimes(otpGenerationTime);
txn.setExpiryDtimes(otpGenerationTime.plusSeconds(
EnvUtil.getOtpExpiryTime()));
txn.setStatusCode(IdAuthCommonConstants.ACTIVE_STATUS);
otpRepo.save(txn);
}
OtpTransaction txn = new OtpTransaction();
txn.setId(UUID.randomUUID().toString());
txn.setRefId(securityManager.hash(otpRequestDTO.getIndividualId()));
txn.setOtpHash(otpHash);
txn.setCrBy(securityManager.getUser());
txn.setGeneratedDtimes(otpGenerationTime);
txn.setCrDtimes(otpGenerationTime);
txn.setExpiryDtimes(otpGenerationTime.plusSeconds(
EnvUtil.getOtpExpiryTime()));
txn.setStatusCode(IdAuthCommonConstants.ACTIVE_STATUS);
otpRepo.save(txn);

String notificationProperty = null;
notificationProperty = otpRequestDTO
.getOtpChannel().stream().map(channel -> NotificationType.getNotificationTypeForChannel(channel)
Expand Down

0 comments on commit 9f780d3

Please sign in to comment.