Skip to content

[MS-1164] Multi-Factor ID. OCR Scanner screen#1379

Merged
alexandr-simprints merged 17 commits into
CORE-3404-search-verifyfrom
MS-1164-mf-id-implementation-ocr-scanner
Sep 30, 2025
Merged

[MS-1164] Multi-Factor ID. OCR Scanner screen#1379
alexandr-simprints merged 17 commits into
CORE-3404-search-verifyfrom
MS-1164-mf-id-implementation-ocr-scanner

Conversation

@alexandr-simprints
Copy link
Copy Markdown
Contributor

JIRA ticket
Will be released in: 2025.4.0

Notable changes

Implementation of the document scanner that uses OCR (Optical Character Recognition) approach to extract an external credential from the document using Google's ML kit.

image image

Additional work checklist

  • Effect on other features and security has been considered
  • Design document marked as "In development" (if applicable)
  • External (Gitbook) and internal (Confluence) Documentation is up to date (or ticket created)
  • Test cases in Testiny are up to date (or ticket created)

import javax.inject.Inject
import kotlin.math.min

internal class CalculateLevenshteinDistanceUseCase @Inject constructor() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be done as a top-level function directly? Could skip some of the injection overhead for a purely mathematical function.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather keep the Levenshtein Distance calculations as a separate use case for testing isolation purposes. Declaring a single injectable field doesn't seem like a great injection overhead

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having this as a function does not hurt testing since it is a pure function - it can be tested the same way, and there is no need to mock it since there are no internal dependencies.

Comment thread infra/resources/src/main/res/values/strings.xml
Copy link
Copy Markdown
Contributor

@luhmirin-s luhmirin-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, rest of the comments are nice-to-haves.

alexandr-simprints and others added 4 commits September 30, 2025 11:21
…ement. 'return' usually for the closest scope block, which in this case is the "forEach"
…It now accepts target length of the credential to filter out incorrect readouts from the pool
@sonarqubecloud
Copy link
Copy Markdown

@alexandr-simprints alexandr-simprints merged commit ffce454 into CORE-3404-search-verify Sep 30, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants