Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added app/assets/images/idv/bar_code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/stylesheets/components/_color.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@media #{$breakpoint-sm} {
.sm-white { color: $white; }
.accent-blue { color: $blue; }
}
19 changes: 19 additions & 0 deletions app/controllers/idv/in_person_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module Idv
class InPersonController < ApplicationController
before_action :render_404_if_disabled
before_action :confirm_two_factor_authenticated

include Flow::FlowStateMachine

FSM_SETTINGS = {
step_url: :idv_in_person_step_url,
final_url: :account_url,
flow: Idv::Flows::InPersonFlow,
analytics_id: Analytics::IN_PERSON_PROOFING,
}.freeze

def render_404_if_disabled
render_not_found unless FeatureManagement.in_person_proofing_enabled?
end
end
end
1 change: 1 addition & 0 deletions app/models/profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Profile < ApplicationRecord
encryption_error: 2,
verification_pending: 3,
verification_cancelled: 4,
in_person_pending: 5,
}

attr_reader :personal_key
Expand Down
1 change: 1 addition & 0 deletions app/services/analytics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def browser_attributes
ADD_EMAIL_VISIT = 'Add Email: enter email visited'.freeze
CAPTURE_DOC = 'Capture Doc'.freeze # visited or submitted is appended
DOC_AUTH = 'Doc Auth'.freeze # visited or submitted is appended
IN_PERSON_PROOFING = 'In Person Proofing'.freeze # visited or submitted is appended
EMAIL_AND_PASSWORD_AUTH = 'Email and Password Authentication'.freeze
EMAIL_DELETION_REQUEST = 'Email Deletion Requested'.freeze
EVENT_DISAVOWAL = 'Event disavowal visited'.freeze
Expand Down
30 changes: 30 additions & 0 deletions app/services/idv/flows/in_person_flow.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module Idv
module Flows
class InPersonFlow < Flow::BaseFlow
STEPS = {
welcome: Idv::Steps::Ipp::WelcomeStep,
find_usps: Idv::Steps::Ipp::FindUspsStep,
usps_list: Idv::Steps::Ipp::UspsListStep,
enter_info: Idv::Steps::Ipp::EnterInfoStep,
verify: Idv::Steps::Ipp::VerifyStep,
encrypt: Idv::Steps::Ipp::EncryptStep,
bar_code: Idv::Steps::Ipp::BarCodeStep,
}.freeze

ACTIONS = {
reset: Idv::Actions::ResetAction,
}.freeze

attr_reader :idv_session # this is needed to support (and satisfy) the current LOA3 flow

def initialize(controller, session, name)
@idv_session = self.class.session_idv(session)
super(controller, STEPS, ACTIONS, session[name])
end

def self.session_idv(session)
session[:idv] ||= { params: {}, step_attempts: { phone: 0 } }
end
end
end
end
9 changes: 9 additions & 0 deletions app/services/idv/steps/ipp/bar_code_step.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Idv
module Steps
module Ipp
class BarCodeStep < DocAuthBaseStep
def call; end
end
end
end
end
9 changes: 9 additions & 0 deletions app/services/idv/steps/ipp/encrypt_step.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Idv
module Steps
module Ipp
class EncryptStep < DocAuthBaseStep
def call; end
end
end
end
end
9 changes: 9 additions & 0 deletions app/services/idv/steps/ipp/enter_info_step.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Idv
module Steps
module Ipp
class EnterInfoStep < DocAuthBaseStep
def call; end
end
end
end
end
9 changes: 9 additions & 0 deletions app/services/idv/steps/ipp/find_usps_step.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Idv
module Steps
module Ipp
class FindUspsStep < DocAuthBaseStep
def call; end
end
end
end
end
9 changes: 9 additions & 0 deletions app/services/idv/steps/ipp/usps_list_step.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Idv
module Steps
module Ipp
class UspsListStep < DocAuthBaseStep
def call; end
end
end
end
end
9 changes: 9 additions & 0 deletions app/services/idv/steps/ipp/verify_step.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Idv
module Steps
module Ipp
class VerifyStep < DocAuthBaseStep
def call; end
end
end
end
end
9 changes: 9 additions & 0 deletions app/services/idv/steps/ipp/welcome_step.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Idv
module Steps
module Ipp
class WelcomeStep < DocAuthBaseStep
def call; end
end
end
end
end
4 changes: 1 addition & 3 deletions app/views/idv/capture_doc/back_image.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ h1.h3.my0 = t('doc_auth.headings.upload_back')
.clearfix.mxn1
.sm-col.sm-col-8.px1.mt2
= f.input :image, label: false, as: 'file', required: true
- unless flow_session[:error_message].nil?
.alert.alert-error = flow_session[:error_message]
.alert.alert-notice == flow_session[:notice]
= render 'idv/doc_auth/error_messages', flow_session: flow_session
.mb4 id= 'target'
.mt2
= render 'idv/doc_auth/submit_with_spinner'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ ul
.sm-col.sm-col-9.px1
= f.input :image, label: false, as: 'file', required: true

- unless flow_session[:error_message].nil?
.alert.alert-error = flow_session[:error_message]
.alert.alert-notice == flow_session[:notice]
= render 'idv/doc_auth/error_messages', flow_session: flow_session

div id= 'target'
br
Expand Down
4 changes: 1 addition & 3 deletions app/views/idv/capture_doc/front_image.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ h1.h3.my0 = t('doc_auth.headings.upload_front')
.sm-col.sm-col-8.px1.mt2
= f.input :image, label: false, as: 'file', required: true

- unless flow_session[:error_message].nil?
.alert.alert-error = flow_session[:error_message]
.alert.alert-notice == flow_session[:notice]
= render 'idv/doc_auth/error_messages', flow_session: flow_session

.mb4 id= 'target'
.mt2
Expand Down
4 changes: 1 addition & 3 deletions app/views/idv/capture_doc/mobile_front_image.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ ul
.sm-col.sm-col-8.px1
= f.input :image, label: false, as: 'file', required: true

- unless flow_session[:error_message].nil?
.alert.alert-error = flow_session[:error_message]
.alert.alert-notice == flow_session[:notice]
= render 'idv/doc_auth/error_messages', flow_session: flow_session

div id= 'target'
br
Expand Down
5 changes: 5 additions & 0 deletions app/views/idv/doc_auth/_error_messages.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- unless flow_session[:error_message].nil?
.alert.alert-error
= flow_session[:error_message]
= render 'idv/doc_auth/in_person_proofing_option'
.alert.alert-notice == flow_session[:notice]
3 changes: 3 additions & 0 deletions app/views/idv/doc_auth/_in_person_proofing_option.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- if FeatureManagement.in_person_proofing_enabled?
br
= link_to t('in_person_proofing.opt_in_link'), idv_in_person_step_path(:welcome)
4 changes: 1 addition & 3 deletions app/views/idv/doc_auth/back_image.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ h1.h3.my0 = t('doc_auth.headings.upload_back')
.sm-col.sm-col-8.px1.mt2
= f.input :image, label: false, as: 'file', required: true

- unless flow_session[:error_message].nil?
.alert.alert-error = flow_session[:error_message]
.alert.alert-notice == flow_session[:notice]
= render 'idv/doc_auth/error_messages', flow_session: flow_session
.mb4 id= 'target'
.mt2
= render 'idv/doc_auth/submit_with_spinner'
Expand Down
4 changes: 1 addition & 3 deletions app/views/idv/doc_auth/front_image.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ h1.h3.my0 = t('doc_auth.headings.upload_front')
.clearfix.mxn1
.sm-col.sm-col-8.px1.mt2
= f.input :image, label: false, as: 'file', required: true
- unless flow_session[:error_message].nil?
.alert.alert-error = flow_session[:error_message]
.alert.alert-notice == flow_session[:notice]
= render 'idv/doc_auth/error_messages', flow_session: flow_session
.mb4 id= 'target'
.mt2
= render 'idv/doc_auth/submit_with_spinner'
Expand Down
4 changes: 1 addition & 3 deletions app/views/idv/doc_auth/mobile_back_image.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ ul
.clearfix.mxn1
.sm-col.sm-col-9.px1
= f.input :image, label: false, as: 'file', required: true
- unless flow_session[:error_message].nil?
.alert.alert-error = flow_session[:error_message]
.alert.alert-notice == flow_session[:notice]
= render 'idv/doc_auth/error_messages', flow_session: flow_session

div id= 'target'
br
Expand Down
4 changes: 1 addition & 3 deletions app/views/idv/doc_auth/mobile_front_image.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ ul
.clearfix.mxn1
.sm-col.sm-col-8.px1
= f.input :image, label: false, as: 'file', required: true
- unless flow_session[:error_message].nil?
.alert.alert-error = flow_session[:error_message]
.alert.alert-notice == flow_session[:notice]
= render 'idv/doc_auth/error_messages', flow_session: flow_session
div id= 'target'
br
.mt0
Expand Down
4 changes: 4 additions & 0 deletions app/views/idv/in_person/_start_over_or_cancel.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
br
= button_to(t('doc_auth.buttons.start_over'), idv_in_person_step_path(:reset), method: :put,
class: 'btn btn-link', form_class: 'inline-block')
= render 'shared/cancel', link: idv_cancel_path
42 changes: 42 additions & 0 deletions app/views/idv/in_person/bar_code.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
- title t('forms.backup_code.title')

h5.my1.caps.bold.accent-blue = t('in_person_proofing.step', step: 3)
br
h1.h3.my0 = t('in_person_proofing.headings.enrollment_form')
p.mt-tiny.mb3 == t('in_person_proofing.info.enrollment_form')
.mb4
fieldset.m0.p0.rounded-xl
ul.list-reset
li.px-12p.mb1.border-none.mt1.m2
.inline-block.h1.bold = t('in_person_proofing.enrollment_form')
.h5.mt0.mb0.pt1.pb2.fs-12p
= t('users.backup_code.generated_on_html',
date: content_tag(:strong, I18n.l(Time.zone.today, format: '%B %d, %Y')))
.inline-block = t('in_person_proofing.instructions.enrollment_form')
br
br
= 'ROSSLYN POST OFFICE'
br
= '1101 WILSON BLVD STE 1 ARLINGTON, VA 22209-9998'
li.mb0.border-top
.alert-inline.bold.border-bottom
= t('in_person_proofing.warning.enrollment_form')
table.pl4.pr3.monospace
tr
td.center
= image_tag(asset_url('idv/bar_code.png'),
alt: t('doc_auth.headings.upload_back'), height: 140)
br
br
.center.mt1
= link_to t('forms.backup_code.download'), backup_code_download_path,
class: 'text-decoration-none ico btn-border ico-download'
= link_to t('forms.backup_code.print'), '#',
data: { print: true },
class: 'ico ico-print btn-border ml2 text-decoration-none'

= link_to t('forms.buttons.continue'), account_path, class: 'btn btn-primary btn-wide'
br
= render 'idv/in_person/start_over_or_cancel'

== javascript_pack_tag 'clipboard'
17 changes: 17 additions & 0 deletions app/views/idv/in_person/encrypt.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- title t('idv.titles.review')

h5.my1.caps.bold.accent-blue = t('in_person_proofing.step', step: 2)
br
h1.h3 = 'Re-enter your login.gov password to protect your information'

p = t('in_person_proofing.instructions.encrypt')

= simple_form_for(:in_person_proofing, url: url_for, method: 'PUT',
html: { autocomplete: 'off', method: :put, role: 'form' }) do |f|
= f.input :password, label: t('idv.form.password'), required: true
.right-align.mtn2.mb4 = t('idv.forgot_password.link_html',
link: link_to(t('idv.forgot_password.link_text'), idv_forgot_password_url,
class: 'btn btn-link ml1', form_class: 'inline-block'))
= f.button :submit, t('forms.buttons.continue'), class: 'btn btn-primary btn-wide sm-col-6 col-12'

= render 'idv/in_person/start_over_or_cancel'
Loading