|
|
@ -78,7 +78,7 @@ public class OTPManagementServiceImpl implements OTPManagementService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void sendUserVerifyingMail(OTPWrapper otpWrapper) throws OTPManagementException, DeviceManagementException {
|
|
|
|
public String sendUserVerifyingMail(OTPWrapper otpWrapper) throws OTPManagementException, DeviceManagementException {
|
|
|
|
Tenant tenant = validateTenantCreatingDetails(otpWrapper);
|
|
|
|
Tenant tenant = validateTenantCreatingDetails(otpWrapper);
|
|
|
|
OneTimePinDTO oneTimePinDTO = createOneTimePin(otpWrapper.getEmail(), otpWrapper.getEmailType(),
|
|
|
|
OneTimePinDTO oneTimePinDTO = createOneTimePin(otpWrapper.getEmail(), otpWrapper.getEmailType(),
|
|
|
|
otpWrapper.getUsername(), tenant, -1234);
|
|
|
|
otpWrapper.getUsername(), tenant, -1234);
|
|
|
@ -90,6 +90,7 @@ public class OTPManagementServiceImpl implements OTPManagementService {
|
|
|
|
props.setProperty("otp-token", oneTimePinDTO.getOtpToken());
|
|
|
|
props.setProperty("otp-token", oneTimePinDTO.getOtpToken());
|
|
|
|
sendMail(props, tenant.getEmail(), DeviceManagementConstants.EmailAttributes.USER_VERIFY_TEMPLATE);
|
|
|
|
sendMail(props, tenant.getEmail(), DeviceManagementConstants.EmailAttributes.USER_VERIFY_TEMPLATE);
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
|
|
|
|
return oneTimePinDTO.getOtpToken();
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
String msg = "Error occurred while disabling AutoCommit.";
|
|
|
|
String msg = "Error occurred while disabling AutoCommit.";
|
|
|
|
log.error(msg, e);
|
|
|
|
log.error(msg, e);
|
|
|
|