Skip to content

Commit

Permalink
Add TODO to PresenceCheckLimitService for #453 (#462)
Browse files Browse the repository at this point in the history
OTP verification could be turned off, logic to count presence check limit should be based on another data
  • Loading branch information
banterCZ authored Oct 20, 2022
1 parent 86c83dd commit 96c7086
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public PresenceCheckLimitService(
*/
public void checkPresenceCheckMaxAttemptLimit(OwnerId ownerId, String processId) throws IdentityVerificationException, PresenceCheckLimitException, RemoteCommunicationException {
final int otpCount = otpRepository.countByProcessIdAndType(processId, OtpType.USER_VERIFICATION);
// TODO (racansky, 2022-10-20, #453) OTP verification could be turned off, logic should be based on another data
if (otpCount > identityVerificationConfig.getPresenceCheckMaxFailedAttempts()) {
final Optional<IdentityVerificationEntity> identityVerificationOptional = identityVerificationRepository.findFirstByActivationIdOrderByTimestampCreatedDesc(ownerId.getActivationId());
if (identityVerificationOptional.isEmpty()) {
Expand Down

0 comments on commit 96c7086

Please sign in to comment.