diff --git a/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/UserAccountRecoveryManager.java b/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/UserAccountRecoveryManager.java index c650fce04a..844bc80b40 100644 --- a/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/UserAccountRecoveryManager.java +++ b/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/UserAccountRecoveryManager.java @@ -936,6 +936,7 @@ public UserRecoveryData getUserRecoveryData(String code, RecoverySteps step) thr * * @param recoveryFlowId Recovery flow id of the user. * @param step Recovery step. + * @return UserRecoveryData Data associated with the provided recoveryFlowId. * @throws IdentityRecoveryException If an error occurred while validating the recoveryId. */ public UserRecoveryData getUserRecoveryDataFromFlowId(String recoveryFlowId, RecoverySteps step) @@ -973,6 +974,7 @@ public UserRecoveryData getUserRecoveryDataFromFlowId(String recoveryFlowId, Rec * Get user recovery flow data using the recovery flow id. * * @param recoveryDataDO User Recovery Data object. + * @return UserRecoveryFlowData Data associated with the provided UserRecoveryData. * @throws IdentityRecoveryException If an error occurred while validating the recoveryId. */ public UserRecoveryFlowData loadUserRecoveryFlowData(UserRecoveryData recoveryDataDO) @@ -1006,8 +1008,10 @@ public UserRecoveryFlowData loadUserRecoveryFlowData(UserRecoveryData recoveryDa * * @param recoveryFlowId Recovery Flow Id. * @param failedAttempts Failed Attempts. + * @throws IdentityRecoveryException If an error occurred while updating the recovery flow data. */ - public void updateRecoveryDataFailedAttempts(String recoveryFlowId, int failedAttempts) throws IdentityRecoveryException { + public void updateRecoveryDataFailedAttempts(String recoveryFlowId, int failedAttempts) + throws IdentityRecoveryException { UserRecoveryDataStore userRecoveryDataStore = JDBCRecoveryDataStore.getInstance(); userRecoveryDataStore.updateFailedAttempts(recoveryFlowId, failedAttempts); @@ -1018,6 +1022,7 @@ public void updateRecoveryDataFailedAttempts(String recoveryFlowId, int failedAt * * @param recoveryFlowId Recovery Flow Id. * @param resendCount Current Resend Count. + * @throws IdentityRecoveryException If an error occurred while updating the recovery flow data. */ public void updateRecoveryDataResendCount(String recoveryFlowId, int resendCount) throws IdentityRecoveryException { @@ -1029,6 +1034,7 @@ public void updateRecoveryDataResendCount(String recoveryFlowId, int resendCount * Invalidate the recovery Data. * * @param recoveryFlowId Recovery Flow Id. + * @throws IdentityRecoveryException If an error occurred while invalidating recovery data. */ public void invalidateRecoveryData(String recoveryFlowId) throws IdentityRecoveryException { diff --git a/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/password/PasswordRecoveryManagerImpl.java b/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/password/PasswordRecoveryManagerImpl.java index 54a8f65bef..a0c105246a 100644 --- a/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/password/PasswordRecoveryManagerImpl.java +++ b/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/password/PasswordRecoveryManagerImpl.java @@ -223,9 +223,9 @@ public PasswordResetCodeDTO confirm(String otp, String confirmationCode, String validateTenantDomain(tenantDomain); UserAccountRecoveryManager userAccountRecoveryManager = UserAccountRecoveryManager.getInstance(); - // In the recovery scenarios which are not OTP based, the confirmation code is a combination of the - // recovery flow id and another UUID generated. Hence, we need to get the recovery flow id from the - // confirmation code. In the OTP based recovery scenario, the confirmation code is the recovery flow id. + /* In the recovery scenarios which are not OTP based, the confirmation code is a combination of the + recovery flow id and another UUID generated. Hence, we need to get the recovery flow id from the + confirmation code. In the OTP based recovery scenario, the confirmation code is the recovery flow id. */ String[] ids = confirmationCode.split(Pattern.quote(IdentityRecoveryConstants.CONFIRMATION_CODE_SEPARATOR)); String recoveryFlowId; String code; diff --git a/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/username/UsernameRecoveryManagerImpl.java b/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/username/UsernameRecoveryManagerImpl.java index 507b9b8bcf..5fd5ebcf9a 100644 --- a/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/username/UsernameRecoveryManagerImpl.java +++ b/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/internal/service/impl/username/UsernameRecoveryManagerImpl.java @@ -294,6 +294,7 @@ private void invalidateRecoveryCode(String recoveryCode) throws IdentityRecovery * Invalidate the recovery flow id. * * @param recoveryFlowId Recovery flow id. + * @throws IdentityRecoveryException If an error occurred while invalidating recovery data. */ private void invalidateRecoveryFlowId(String recoveryFlowId) throws IdentityRecoveryException {