-
Notifications
You must be signed in to change notification settings - Fork 167
LG-14813 default users requiring facial match to LN #11531
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
Changes from 7 commits
cb0eec1
525f020
0b53d6a
186fbad
cbb481d
f466567
eeb1cd2
d38a8a9
2b3b086
d0dd148
3a3803f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,8 +6,23 @@ module DocAuthVendorConcern | |||||||||||||
|
|
||||||||||||||
| # @returns[String] String identifying the vendor to use for doc auth. | ||||||||||||||
| def doc_auth_vendor | ||||||||||||||
| bucket = ab_test_bucket(:DOC_AUTH_VENDOR) | ||||||||||||||
| if resolved_authn_context_result.facial_match? | ||||||||||||||
| return nil if lexis_nexis_not_enabled? | ||||||||||||||
| bucket = default_vendor_is_not_mock? ? :lexis_nexis : :mock | ||||||||||||||
| else | ||||||||||||||
| bucket = ab_test_bucket(:DOC_AUTH_VENDOR) | ||||||||||||||
| end | ||||||||||||||
| DocAuthRouter.doc_auth_vendor_for_bucket(bucket) | ||||||||||||||
| end | ||||||||||||||
|
|
||||||||||||||
| def lexis_nexis_not_enabled? | ||||||||||||||
| (IdentityConfig.store.doc_auth_vendor_default == Idp::Constants::Vendors::SOCURE || | ||||||||||||||
| IdentityConfig.store.doc_auth_vendor_default.nil?) && | ||||||||||||||
| IdentityConfig.store.doc_auth_vendor_lexis_nexis_percent == 0 | ||||||||||||||
| end | ||||||||||||||
|
theabrad marked this conversation as resolved.
Outdated
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| def default_vendor_is_not_mock? | ||||||||||||||
| IdentityConfig.store.doc_auth_vendor_default != Idp::Constants::Vendors::MOCK | ||||||||||||||
| end | ||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
doesn't seem we're still using this 🤔 |
||||||||||||||
| end | ||||||||||||||
| end | ||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,11 +64,37 @@ | |
| end | ||
|
|
||
| context 'when we try to use this controller but we should be using the LN/mock version' do | ||
| let(:idv_vendor) { Idp::Constants::Vendors::LEXIS_NEXIS } | ||
| context 'when doc_auth_vendor is Lexis Nexis' do | ||
| let(:idv_vendor) { Idp::Constants::Vendors::LEXIS_NEXIS } | ||
|
Comment on lines
-67
to
+71
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks 🙏🏿 |
||
|
|
||
| it 'redirects to the LN/mock controller' do | ||
| get :show | ||
| expect(response).to redirect_to idv_hybrid_mobile_document_capture_url | ||
| it 'redirects to the LN/mock controller' do | ||
| get :show | ||
| expect(response).to redirect_to idv_hybrid_mobile_document_capture_url | ||
| end | ||
| end | ||
|
|
||
| context 'when facial match is required' do | ||
| let(:acr_values) do | ||
| [ | ||
| Saml::Idp::Constants::IAL2_BIO_REQUIRED_AUTHN_CONTEXT_CLASSREF, | ||
| Saml::Idp::Constants::DEFAULT_AAL_AUTHN_CONTEXT_CLASSREF, | ||
| ].join(' ') | ||
| end | ||
| before do | ||
| resolved_authn_context = AuthnContextResolver.new( | ||
| user: user, | ||
| service_provider: nil, | ||
| vtr: nil, | ||
| acr_values: acr_values, | ||
| ).result | ||
| allow(controller).to receive(:resolved_authn_context_result). | ||
| and_return(resolved_authn_context) | ||
| end | ||
|
|
||
| it 'redirects to the LN/mock controller' do | ||
| get :show | ||
| expect(response).to redirect_to idv_hybrid_mobile_document_capture_url | ||
| end | ||
| end | ||
| end | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.