Jmax/lg 11942 add a selfie check performed prop to the doc auth response#9825
Jmax/lg 11942 add a selfie check performed prop to the doc auth response#9825
Conversation
changelog: Internal,Selfie check,stub selfie_check_performed on DocAuth::Response
06255be to
52847c4
Compare
app/services/doc_auth/response.rb
Outdated
| doc_type_supported: true | ||
| doc_type_supported: true, | ||
| # This is a stub to get data paths in place. Replace this as soon as possible. | ||
| selfie_check_performed: IdentityConfig.store.doc_auth_selfie_capture_enabled |
There was a problem hiding this comment.
We need to check whether the sp requested a selfie (which also checks the config value). If the session isn't available here we'll need to pass in the value.
| selfie_check_performed: IdentityConfig.store.doc_auth_selfie_capture_enabled | |
| selfie_check_performed: decorated_sp_session.selfie_required? |
There was a problem hiding this comment.
I agree that #selfie_required? would be better, but since this is stub code anyway, I'm really reluctant to pass in the decorated session. The other alternative is to remove the default value for selfie_check_performed and pass in a value everywhere it's called, and I like that even less for stub code.
| allow(IdentityConfig.store). | ||
| to receive(:doc_auth_selfie_capture_enabled). | ||
| and_return(selfies_enabled) |
There was a problem hiding this comment.
Will also need to set sp[:biometric_comparison_required] here to go with the above code change.
There was a problem hiding this comment.
Same comment as above; I think this is too much for the stub.
🎫 Ticket
LG-11942
🛠 Summary of changes
Added
selfie_check_performed?method and property toDocAuth::Responseobject.As a temporary measure, we default this value to
trueif selfie checks are enabled, andfalseif they are not.This is stub code, and needs to be replaced with real values from the IdV vendors, with the specs updated accordingly, before selfies are enabled in production.
📜 Testing Plan
application.yml, setdoc_auth_selfie_capture_enabledtotrueDocAuth::Responseobject. Do not specify a value for theselfie_check_performedparameter.truefromselfie_check_performed?doc_auth_selfie_capture_enabledtofalseDocAuth::Responseobject. Do not specify a value for theselfie_check_performedparameter.falsefromselfie_check_performed?👀 Screenshots
Selfie check disabled:
Selfie check enabled: