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

IdV Flow

David Corwin edited this page Apr 16, 2018 · 3 revisions

The IdV Flow is responsible for all routing, view logic and data collection to support proofing identities. At the appropriate place in the flow (after collecting the profile), it calls into the Proofer Logic with the applicant data and handles the results. There will be a dependency between the flow and the Proofer Logic to coordinate the necessary steps when the proofer asks for more information.

Example Logic

  • proofing flow
    • call into Proofer Logic with the applicant data
    • evaluate the result
    • update the IdV state for the user
    • redirect to the next step
    • possible call again after more data collected

Example Code

def proof(applicant)
  result = Idv::Proofer.proof(applicant)

  case
    when result.error?
      update_idv_state(result.applicant, :error)
      # analytics
      redirect_to uh_oh_url

    when result.failure?
      update_idv_state(result.applicant)
      # analytics
      redirect_to idv_step_url(result.next_attribute)

    when result.success?
      update_idv_state(result.applicant, :verified)
      # analytics
      redirect_to idv_step_url(:next)
  end
end

Clone this wiki locally