From 6cf4ba3810b128d44ecda1f77629159bac56c15e Mon Sep 17 00:00:00 2001 From: Neha2365 <110969715+Neha2365@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:14:15 +0530 Subject: [PATCH] Mosip 30687 on demand template extraction (#1203) * MOSIP-30687 partner data changed Signed-off-by: Neha Farheen * MOSIP-30687 partner data changed Signed-off-by: Neha Farheen * MOSIP-30687 changes done for ondemand Signed-off-by: Neha Farheen * MOSIP-30687 changes done for exception Signed-off-by: Neha Farheen * Changes in error message Signed-off-by: Neha Farheen * Changes in error message Signed-off-by: Neha Farheen * REmoved the error message related changes Signed-off-by: Neha Farheen * MOSIP-31517 On demand changes error message removal Signed-off-by: Neha Farheen * Changes done Signed-off-by: Neha Farheen * otp controller changes Signed-off-by: Neha Farheen * OTP repo changes Signed-off-by: Neha Farheen * OTP repo changes Signed-off-by: Neha Farheen * OTP manager changes done Signed-off-by: Neha Farheen * encoded the encrypted data Signed-off-by: Neha Farheen * ondemand changes Signed-off-by: Neha Farheen * changes in encoding Signed-off-by: Neha Farheen * logger changes Signed-off-by: Neha Farheen --------- Signed-off-by: Neha Farheen Co-authored-by: Neha Farheen Co-authored-by: 61092365 <61092365@DPQ7NM3> --- .../service/transaction/manager/IdAuthSecurityManager.java | 3 ++- .../authentication/otp/service/controller/OTPController.java | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/authentication/authentication-common/src/main/java/io/mosip/authentication/common/service/transaction/manager/IdAuthSecurityManager.java b/authentication/authentication-common/src/main/java/io/mosip/authentication/common/service/transaction/manager/IdAuthSecurityManager.java index d08ca2d36fc..a81f554cae2 100644 --- a/authentication/authentication-common/src/main/java/io/mosip/authentication/common/service/transaction/manager/IdAuthSecurityManager.java +++ b/authentication/authentication-common/src/main/java/io/mosip/authentication/common/service/transaction/manager/IdAuthSecurityManager.java @@ -519,7 +519,8 @@ public String asymmetricEncryption(byte[] dataToEncrypt, String partnerCertifica PublicKey publicKey = x509Certificate.getPublicKey(); byte[] encryptedData = cryptoCore.asymmetricEncrypt(publicKey, dataToEncrypt); mosipLogger.info("AssymetricEncrypted data -- Start" + encryptedData+ " End--AssymetricEncrypted data" ); - return CryptoUtil.encodeBase64Url(encryptedData); + return CryptoUtil.encodeBase64(encryptedData); + } /** diff --git a/authentication/authentication-otp-service/src/main/java/io/mosip/authentication/otp/service/controller/OTPController.java b/authentication/authentication-otp-service/src/main/java/io/mosip/authentication/otp/service/controller/OTPController.java index d445bb5fa5c..b3a9e75af09 100644 --- a/authentication/authentication-otp-service/src/main/java/io/mosip/authentication/otp/service/controller/OTPController.java +++ b/authentication/authentication-otp-service/src/main/java/io/mosip/authentication/otp/service/controller/OTPController.java @@ -140,6 +140,8 @@ public OtpResponseDTO generateOTP(@Valid @RequestBody OtpRequestDTO otpRequestDt String idvidHash = securityManager.hash(otpRequestDto.getIndividualId()); String idType = Objects.nonNull(otpRequestDto.getIndividualIdType()) ? otpRequestDto.getIndividualIdType() : idTypeUtil.getIdType(otpRequestDto.getIndividualId()).getType(); + logger.debug(IdAuthCommonConstants.SESSION_ID, this.getClass().getSimpleName(), GENERATE_OTP, + "IdType...."+ idType); otpRequestDto.setIndividualIdType(idType); otpRequestValidator.validateIdvId(otpRequestDto.getIndividualId(), idType, errors, IdAuthCommonConstants.IDV_ID); DataValidationUtil.validate(errors);