Class: MHVLoggingService

Inherits:
Object
  • Object
show all
Defined in:
app/services/mhv_logging_service.rb

Class Method Summary collapse

Class Method Details

.login(current_user) ⇒ Object



5
6
7
8
9
10
11
12
# File 'app/services/mhv_logging_service.rb', line 5

def self.(current_user)
  if current_user.loa3? && current_user.mhv_correlation_id && !current_user.mhv_last_signed_in
    MHV::AuditLoginJob.perform_async(current_user.uuid)
    true
  else
    false
  end
end

.logout(current_user) ⇒ Object



14
15
16
17
18
19
20
21
# File 'app/services/mhv_logging_service.rb', line 14

def self.logout(current_user)
  if current_user.mhv_last_signed_in
    MHV::AuditLogoutJob.perform_async(current_user.uuid, current_user.mhv_correlation_id)
    true
  else
    false
  end
end