Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Implement ProofAddress lambda (LG-3579) #3

Merged
merged 8 commits into from Oct 2, 2020

Conversation

zachmargolis
Copy link
Contributor

@zachmargolis zachmargolis commented Oct 1, 2020

(I also scaffolded out a ProofResolution that I removed in 3d47d11, because I figure the structure of the two will match, so I wanted to get feedback on this approach first

The gist right now is:

Inputs to the lambda:

  • applicant_pii (object), the args we pass directly to the proofer gem (name, address, dob, uuid, etc etc)
  • callback_url (string), URL we are expected to call back to in the IDP

Lambda result (aka response):

POSTs to $callback_url with a body like this (it's Proofer::Result#to_h as JSON)

headers:

  • X-API-AUTH-TOKEN: shared secret with IDP (may need to differ per env)

body:

{
  "address_result": {
    "success": true,
    "exception": null,
    "errors": {},
    "messages": []
  }
}

require File.expand_path(support)
end

Retries.sleep_enabled = false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line is basically why I opted to use retries gem over Faraday's retrying -- I could not find any indication that Faraday would let us "cancel" sleeps in tests, so this lets us test our logic in specs without slowing them down or adding a lot of extra config logic

Comment on lines +20 to +25
'lexisnexis_account_id' => 'abc123',
'lexisnexis_request_mode' => 'aaa',
'lexisnexis_username' => 'aaa',
'lexisnexis_password' => 'aaa',
'lexisnexis_base_url' => 'https://lexisnexis.example.com/',
'lexisnexis_phone_finder_workflow' => 'aaa',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

definitely looking forward to a day when we can pass these all in to the gems as explicit params instead of relying on ENV vars

@zachmargolis zachmargolis changed the title Implement ProofAddress lambda Implement ProofAddress lambda (LG-3579) Oct 2, 2020
Copy link
Contributor

@mitchellhenke mitchellhenke left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍🏼

@zachmargolis zachmargolis merged commit 14df6da into master Oct 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants