use of org.wso2.carbon.identity.user.endpoint.exceptions.InternalServerErrorException in project identity-governance by wso2-extensions.
the class Utils method getUserRecoveryData.
/**
* Gets user recovery data for a specific user.
*
* @param resendCodeRequestDTO resendCodeRequestDTO.
* @return User recovery data.
*/
public static UserRecoveryData getUserRecoveryData(ResendCodeRequestDTO resendCodeRequestDTO) {
UserRecoveryDataStore userRecoveryDataStore = JDBCRecoveryDataStore.getInstance();
UserRecoveryData userRecoveryData = null;
try {
userRecoveryData = userRecoveryDataStore.loadWithoutCodeExpiryValidation(Utils.getUser(resendCodeRequestDTO.getUser()));
} catch (IdentityRecoveryException e) {
throw new InternalServerErrorException("Error in loading user recovery data for " + Utils.getUser(resendCodeRequestDTO.getUser()), e);
}
return userRecoveryData;
}
Aggregations