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
2 changes: 2 additions & 0 deletions app/controllers/users/piv_cac_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module Users
class PivCacController < ApplicationController
include ReauthenticationRequiredConcern
include PivCacConcern

before_action :confirm_two_factor_authenticated
before_action :confirm_recently_authenticated_2fa
Expand Down Expand Up @@ -33,6 +34,7 @@ def destroy
create_user_event(:piv_cac_disabled)
revoke_remember_device(current_user)
deliver_push_notification
clear_piv_cac_information

flash[:success] = presenter.delete_success_alert_text
redirect_to account_path
Expand Down
6 changes: 6 additions & 0 deletions spec/controllers/users/piv_cac_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@
expect(flash[:success]).to eq(presenter.delete_success_alert_text)
end

it 'removes the piv/cac information from the user session' do
controller.user_session[:decrypted_x509] = {}
response
expect(controller.user_session[:decrypted_x509]).to be_nil
end

it 'logs the submission attempt' do
response

Expand Down