Skip to content
Merged
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
86 changes: 43 additions & 43 deletions app/services/irs_attempts_api/tracker_events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ def logout_initiated(success:)
)
end

# Tracks when the user has attempted to enroll the Backup Codes MFA method to their account
# @param [Boolean] success
def mfa_enroll_backup_code(success:)
track_event(
:mfa_enroll_backup_code,
success: success,
)
end

# @param [Boolean] success True if selection was valid
# @param [Array<String>] mfa_device_types List of MFA options users selected on account creation
# A user has selected MFA options
Expand All @@ -40,15 +49,6 @@ def mfa_enroll_options_selected(success:, mfa_device_types:)
)
end

# Tracks when the user has attempted to enroll the Backup Codes MFA method to their account
# @param [Boolean] success
def mfa_enroll_backup_code(success:)
track_event(
:mfa_enroll_backup_code,
success: success,
)
end

# @param [String] phone_number - The user's phone_number used for multi-factor authentication
# @param [Boolean] success - True if the OTP Verification was sent
# Relevant only when the user is enrolling a phone as their MFA.
Expand All @@ -71,6 +71,23 @@ def mfa_enroll_phone_otp_submitted(success:)
)
end

# Tracks when the user has attempted to enroll the piv cac MFA method to their account
# @param [String] subject_dn
# @param [Boolean] success
# @param [Hash<Symbol,Array<Symbol>>] failure_reason
def mfa_enroll_piv_cac(
success:,
subject_dn: nil,
failure_reason: nil
)
track_event(
:mfa_enroll_piv_cac,
success: success,
subject_dn: subject_dn,
failure_reason: failure_reason,
)
end

# Tracks when the user has attempted to enroll the TOTP MFA method to their account
# @param [Boolean] success
def mfa_enroll_totp(success:)
Expand Down Expand Up @@ -131,6 +148,23 @@ def mfa_login_phone_otp_submitted(reauthentication:, success:)
)
end

# Tracks when the user has attempted to log in with the piv cac MFA method to their account
# @param [String] subject_dn
# @param [Boolean] success
# @param [Hash<Symbol,Array<Symbol>>] failure_reason
def mfa_login_piv_cac(
success:,
subject_dn: nil,
failure_reason: nil
)
track_event(
:mfa_login_piv_cac,
success: success,
subject_dn: subject_dn,
failure_reason: failure_reason,
)
end

# Tracks when the user has attempted to log in with the TOTP MFA method to access their account
# @param [Boolean] success
def mfa_login_totp(success:)
Expand Down Expand Up @@ -158,40 +192,6 @@ def mfa_login_webauthn_roaming(success:)
)
end

# Tracks when the user has attempted to enroll the piv cac MFA method to their account
# @param [String] subject_dn
# @param [Boolean] success
# @param [Hash<Symbol,Array<Symbol>>] failure_reason
def mfa_enroll_piv_cac(
success:,
subject_dn: nil,
failure_reason: nil
)
track_event(
:mfa_enroll_piv_cac,
success: success,
subject_dn: subject_dn,
failure_reason: failure_reason,
)
end

# Tracks when the user has attempted to log in with the piv cac MFA method to their account
# @param [String] subject_dn
# @param [Boolean] success
# @param [Hash<Symbol,Array<Symbol>>] failure_reason
def mfa_login_piv_cac(
success:,
subject_dn: nil,
failure_reason: nil
)
track_event(
:mfa_login_piv_cac,
success: success,
subject_dn: subject_dn,
failure_reason: failure_reason,
)
end

# Tracks when user confirms registration email
# @param [Boolean] success
# @param [String] email
Expand Down