Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate if the identity document is Ecuadorian #246

Merged
merged 22 commits into from
Mar 23, 2024
Merged

Validate if the identity document is Ecuadorian #246

merged 22 commits into from
Mar 23, 2024

Conversation

MrDave1999
Copy link
Member

@MrDave1999 MrDave1999 commented Mar 21, 2024

The purpose of this PR is to implement the algorithm in a plugin project and to be able to change the implementation from a configuration file (.env). Algorithm used: https://www.skypack.dev/view/udv-ec

For example, I could add this implementation:

PLUGINS=Plugin.IdentityDocument.Ecuador

Or I could exchange it for another one in the future:

PLUGINS=Plugin.IdentityDocument.CostaRica

In case there is no plugin loaded to validate the identity document, the host application will use a fake provider called FakeIdentityDocument.

The algorithm for verifying an identity document is highly dependent on the country in which the application is used, so it makes sense to decouple this logic from the host application.

This approach is very flexible, new implementations can be added without having to modify the host application code, allowing the assembly to be loaded dynamically.

@MrDave1999 MrDave1999 marked this pull request as ready for review March 23, 2024 15:22
@MrDave1999 MrDave1999 merged commit 1a46173 into dev Mar 23, 2024
1 check passed
@MrDave1999 MrDave1999 deleted the patch-21 branch March 23, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant