-
Notifications
You must be signed in to change notification settings - Fork 166
LG-13762: Derive proofing_components dynamically #10870
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
a6a9ac9
Implement proofing_components in terms of idv_session
matthinz e0ae96d
Log dynamic proofing_components
matthinz 6479108
WIP
matthinz f7309c3
Analytics spec: Ensure FakeAnalytics has a session
matthinz 75ca09c
Special case Idv::ProofingComponents in FakeAnalytics
matthinz 5226e11
Fix analytics feature tests
matthinz 506220f
Add IPP-related methods to AnonymousUser
matthinz 55f18e4
Add missing frozen_string_literal to top of file
matthinz 8d7e60c
Ensure FakeAnalytics has a session in cancel feature spec
matthinz 5c112a2
Log analytics before clearing session when starting over
matthinz 643ecc3
Various small test fixes
matthinz 9e9f095
Revert changes to OutOfBandSessionAccessor
matthinz d6a4cda
Remove unused user_session method
matthinz 6dc5ac6
Remove references to unused proofing component fields
matthinz 131de1f
Remove Idv::ProofingComponentsLogging
matthinz 459061b
Fix doc comments
matthinz 8612fef
Use fewer words
matthinz 23d34e1
Update spec/services/idv/analytics_events_enhancer_spec.rb
matthinz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| module Idv | ||
| class ProofingComponents | ||
| def initialize( | ||
| user:, | ||
| idv_session: | ||
| ) | ||
| @user = user | ||
| @idv_session = idv_session | ||
| end | ||
|
|
||
| def document_check | ||
| if user.establishing_in_person_enrollment || user.pending_in_person_enrollment | ||
| Idp::Constants::Vendors::USPS | ||
| elsif idv_session.remote_document_capture_complete? | ||
| DocAuthRouter.doc_auth_vendor( | ||
| discriminator: idv_session.document_capture_session_uuid, | ||
| ) | ||
| end | ||
| end | ||
|
|
||
| def document_type | ||
| return 'state_id' if idv_session.remote_document_capture_complete? | ||
| end | ||
|
|
||
| def source_check | ||
| Idp::Constants::Vendors::AAMVA if idv_session.verify_info_step_complete? | ||
| end | ||
|
|
||
| def resolution_check | ||
| Idp::Constants::Vendors::LEXIS_NEXIS if idv_session.verify_info_step_complete? | ||
| end | ||
|
|
||
| def address_check | ||
| if idv_session.verify_by_mail? | ||
| 'gpo_letter' | ||
| elsif idv_session.address_verification_mechanism == 'phone' | ||
| 'lexis_nexis_address' | ||
| end | ||
| end | ||
|
|
||
| def threatmetrix | ||
matthinz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if idv_session.threatmetrix_review_status.present? | ||
| FeatureManagement.proofing_device_profiling_collecting_enabled? | ||
| end | ||
| end | ||
|
|
||
| def threatmetrix_review_status | ||
| idv_session.threatmetrix_review_status | ||
| end | ||
|
|
||
| def to_h | ||
| { | ||
| document_check:, | ||
| document_type:, | ||
| source_check:, | ||
| resolution_check:, | ||
| address_check:, | ||
| threatmetrix:, | ||
| threatmetrix_review_status:, | ||
|
|
||
| }.compact | ||
| end | ||
|
|
||
| private | ||
|
|
||
| attr_reader :user, :idv_session | ||
| end | ||
| end | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.