Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Rashmini committed Oct 10, 2023
1 parent 4544a6c commit 6e6aa31
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -928,9 +928,8 @@ private PasswordResetCodeDTO validateConfirmationCode(UserAccountRecoveryManager
throw ex;
}
}
if (!(StringUtils.equals(userRecoveryData.getRemainingSetIds(),NotificationChannels.EMAIL_CHANNEL.
getChannelType()) || StringUtils.equals(userRecoveryData.getRemainingSetIds(),NotificationChannels.
EXTERNAL_CHANNEL.getChannelType()))) {
if (!(NotificationChannels.EMAIL_CHANNEL.getChannelType().equals(userRecoveryData.getRemainingSetIds()) ||
NotificationChannels.EXTERNAL_CHANNEL.getChannelType().equals(userRecoveryData.getRemainingSetIds()))) {
throw Utils.handleClientException(
IdentityRecoveryConstants.ErrorMessages.ERROR_CODE_INVALID_RECOVERY_FLOW_ID, confirmationCode);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -821,9 +821,8 @@ private UserRecoveryData validateUserRecoveryDataFromCode(String code, String co
throw ex;
}
}
if (!(StringUtils.equals(userRecoveryData.getRemainingSetIds(),NotificationChannels.EMAIL_CHANNEL.
getChannelType()) || StringUtils.equals(userRecoveryData.getRemainingSetIds(),NotificationChannels.
EXTERNAL_CHANNEL.getChannelType()))) {
if (!(NotificationChannels.EMAIL_CHANNEL.getChannelType().equals(userRecoveryData.getRemainingSetIds()) ||
NotificationChannels.EXTERNAL_CHANNEL.getChannelType().equals(userRecoveryData.getRemainingSetIds()))) {
throw Utils.handleClientException(
IdentityRecoveryConstants.ErrorMessages.ERROR_CODE_INVALID_RECOVERY_FLOW_ID, confirmationCode);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1204,9 +1204,8 @@ public static String generateSecretKey(String channel, String tenantDomain, Stri
*/
public static String concatRecoveryFlowIdWithSecretKey(String recoveryFlowId, String notificationChannel,
String secretKey) {
if (recoveryFlowId != null && (StringUtils.equals(notificationChannel, NotificationChannels.EMAIL_CHANNEL.
getChannelType()) || StringUtils.equals(notificationChannel, NotificationChannels.EXTERNAL_CHANNEL.
getChannelType()))) {
if (recoveryFlowId != null && (NotificationChannels.EMAIL_CHANNEL.getChannelType().equals(notificationChannel)
|| NotificationChannels.EXTERNAL_CHANNEL.getChannelType().equals(notificationChannel))) {
secretKey = recoveryFlowId + IdentityRecoveryConstants.CONFIRMATION_CODE_SEPARATOR + secretKey;
}
return secretKey;
Expand Down

0 comments on commit 6e6aa31

Please sign in to comment.